Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paales committed Feb 16, 2024
1 parent 4d7594c commit c8633d4
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 79 deletions.
8 changes: 2 additions & 6 deletions docs/framework/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,7 @@ All storefront configuration for the project

#### locale: string (required)

Must be a [locale string](https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers) for automatic redirects to work.

This value can be used as a sub-path identifier only, make sure linguiLocale is configured for each URL.
Must be a locale string https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers

#### magentoStoreCode: string (required)

Expand Down Expand Up @@ -392,9 +390,7 @@ Add a gcms-locales header to make sure queries return in a certain language, can

#### linguiLocale: string

Specify a custom locale for to load translations. Must be lowercase valid locale.

This value is also used for the Intl.
Specify a custom locale for to load translations.

### MagentoConfigurableVariantValues

Expand Down
2 changes: 1 addition & 1 deletion docs/hygraph/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ file:

`hygraphEndpoint: ''`
Hygraph API URL. Once logged in, copy it from Project Settings > Api Access >
Content API
High Performance Content API

## Adding content to pages

Expand Down
3 changes: 3 additions & 0 deletions packages/framer-next-pages/hooks/usePageRouter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { useRouter } from 'next/router'

/**
* @deprecated Use next/router useRouter instead
*/
export const usePageRouter = () => {
console.warn('usePageRouter does nothing, use next/router useRouter instead')
return useRouter()
Expand Down
187 changes: 115 additions & 72 deletions packagesDev/next-config/dist/generated/config.js
Original file line number Diff line number Diff line change
@@ -1,94 +1,137 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SidebarGalleryConfigSchema = exports.RecentlyViewedProductsConfigSchema = exports.MagentoConfigurableVariantValuesSchema = exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.SidebarGalleryPaginationVariantSchema = exports.ProductFiltersLayoutSchema = exports.CompareVariantSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
/* eslint-disable */
const zod_1 = require("zod");
const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
exports.isDefinedNonNullAny = isDefinedNonNullAny;
exports.definedNonNullAnySchema = zod_1.z.any().refine((v) => (0, exports.isDefinedNonNullAny)(v));
exports.CompareVariantSchema = zod_1.z.enum(['CHECKBOX', 'ICON']);
exports.ProductFiltersLayoutSchema = zod_1.z.enum(['DEFAULT', 'SIDEBAR']);
exports.SidebarGalleryPaginationVariantSchema = zod_1.z.enum(['DOTS', 'THUMBNAILS_BOTTOM']);
/* eslint-disable */ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
CompareVariantSchema: function() {
return CompareVariantSchema;
},
GraphCommerceConfigSchema: function() {
return GraphCommerceConfigSchema;
},
GraphCommerceDebugConfigSchema: function() {
return GraphCommerceDebugConfigSchema;
},
GraphCommerceStorefrontConfigSchema: function() {
return GraphCommerceStorefrontConfigSchema;
},
MagentoConfigurableVariantValuesSchema: function() {
return MagentoConfigurableVariantValuesSchema;
},
ProductFiltersLayoutSchema: function() {
return ProductFiltersLayoutSchema;
},
RecentlyViewedProductsConfigSchema: function() {
return RecentlyViewedProductsConfigSchema;
},
SidebarGalleryConfigSchema: function() {
return SidebarGalleryConfigSchema;
},
SidebarGalleryPaginationVariantSchema: function() {
return SidebarGalleryPaginationVariantSchema;
},
definedNonNullAnySchema: function() {
return definedNonNullAnySchema;
},
isDefinedNonNullAny: function() {
return isDefinedNonNullAny;
}
});
const _zod = require("zod");
const isDefinedNonNullAny = (v)=>v !== undefined && v !== null;
const definedNonNullAnySchema = _zod.z.any().refine((v)=>isDefinedNonNullAny(v));
const CompareVariantSchema = _zod.z.enum([
"CHECKBOX",
"ICON"
]);
const ProductFiltersLayoutSchema = _zod.z.enum([
"DEFAULT",
"SIDEBAR"
]);
const SidebarGalleryPaginationVariantSchema = _zod.z.enum([
"DOTS",
"THUMBNAILS_BOTTOM"
]);
function GraphCommerceConfigSchema() {
return zod_1.z.object({
canonicalBaseUrl: zod_1.z.string().min(1),
cartDisplayPricesInclTax: zod_1.z.boolean().nullish(),
compare: zod_1.z.boolean().nullish(),
compareVariant: exports.CompareVariantSchema.nullish(),
configurableVariantForSimple: zod_1.z.boolean().nullish(),
return _zod.z.object({
canonicalBaseUrl: _zod.z.string().min(1),
cartDisplayPricesInclTax: _zod.z.boolean().nullish(),
compare: _zod.z.boolean().nullish(),
compareVariant: CompareVariantSchema.nullish(),
configurableVariantForSimple: _zod.z.boolean().nullish(),
configurableVariantValues: MagentoConfigurableVariantValuesSchema().nullish(),
crossSellsHideCartItems: zod_1.z.boolean().nullish(),
crossSellsRedirectItems: zod_1.z.boolean().nullish(),
customerRequireEmailConfirmation: zod_1.z.boolean().nullish(),
crossSellsHideCartItems: _zod.z.boolean().nullish(),
crossSellsRedirectItems: _zod.z.boolean().nullish(),
customerRequireEmailConfirmation: _zod.z.boolean().nullish(),
debug: GraphCommerceDebugConfigSchema().nullish(),
demoMode: zod_1.z.boolean().nullish(),
enableGuestCheckoutLogin: zod_1.z.boolean().nullish(),
googleAnalyticsId: zod_1.z.string().nullish(),
googleRecaptchaKey: zod_1.z.string().nullish(),
googleTagmanagerId: zod_1.z.string().nullish(),
hygraphEndpoint: zod_1.z.string().min(1),
hygraphManagementApi: zod_1.z.string().nullish(),
hygraphProjectId: zod_1.z.string().nullish(),
hygraphWriteAccessEndpoint: zod_1.z.string().nullish(),
hygraphWriteAccessToken: zod_1.z.string().nullish(),
limitSsg: zod_1.z.boolean().nullish(),
magentoEndpoint: zod_1.z.string().min(1),
previewSecret: zod_1.z.string().nullish(),
productFiltersLayout: exports.ProductFiltersLayoutSchema.nullish(),
productFiltersPro: zod_1.z.boolean().nullish(),
productRoute: zod_1.z.string().nullish(),
demoMode: _zod.z.boolean().nullish(),
enableGuestCheckoutLogin: _zod.z.boolean().nullish(),
googleAnalyticsId: _zod.z.string().nullish(),
googleRecaptchaKey: _zod.z.string().nullish(),
googleTagmanagerId: _zod.z.string().nullish(),
hygraphEndpoint: _zod.z.string().min(1),
hygraphManagementApi: _zod.z.string().nullish(),
hygraphProjectId: _zod.z.string().nullish(),
hygraphWriteAccessEndpoint: _zod.z.string().nullish(),
hygraphWriteAccessToken: _zod.z.string().nullish(),
limitSsg: _zod.z.boolean().nullish(),
magentoEndpoint: _zod.z.string().min(1),
previewSecret: _zod.z.string().nullish(),
productFiltersLayout: ProductFiltersLayoutSchema.nullish(),
productFiltersPro: _zod.z.boolean().nullish(),
productRoute: _zod.z.string().nullish(),
recentlyViewedProducts: RecentlyViewedProductsConfigSchema().nullish(),
robotsAllow: zod_1.z.boolean().nullish(),
robotsAllow: _zod.z.boolean().nullish(),
sidebarGallery: SidebarGalleryConfigSchema().nullish(),
storefront: zod_1.z.array(GraphCommerceStorefrontConfigSchema()),
wishlistHideForGuests: zod_1.z.boolean().nullish(),
wishlistShowFeedbackMessage: zod_1.z.boolean().nullish()
storefront: _zod.z.array(GraphCommerceStorefrontConfigSchema()),
wishlistHideForGuests: _zod.z.boolean().nullish(),
wishlistShowFeedbackMessage: _zod.z.boolean().nullish()
});
}
exports.GraphCommerceConfigSchema = GraphCommerceConfigSchema;
function GraphCommerceDebugConfigSchema() {
return zod_1.z.object({
pluginStatus: zod_1.z.boolean().nullish(),
sessions: zod_1.z.boolean().nullish(),
webpackCircularDependencyPlugin: zod_1.z.boolean().nullish(),
webpackDuplicatesPlugin: zod_1.z.boolean().nullish()
return _zod.z.object({
pluginStatus: _zod.z.boolean().nullish(),
sessions: _zod.z.boolean().nullish(),
webpackCircularDependencyPlugin: _zod.z.boolean().nullish(),
webpackDuplicatesPlugin: _zod.z.boolean().nullish()
});
}
exports.GraphCommerceDebugConfigSchema = GraphCommerceDebugConfigSchema;
function GraphCommerceStorefrontConfigSchema() {
return zod_1.z.object({
canonicalBaseUrl: zod_1.z.string().nullish(),
cartDisplayPricesInclTax: zod_1.z.boolean().nullish(),
defaultLocale: zod_1.z.boolean().nullish(),
domain: zod_1.z.string().nullish(),
googleAnalyticsId: zod_1.z.string().nullish(),
googleRecaptchaKey: zod_1.z.string().nullish(),
googleTagmanagerId: zod_1.z.string().nullish(),
hygraphLocales: zod_1.z.array(zod_1.z.string().min(1)).nullish(),
linguiLocale: zod_1.z.string().nullish(),
locale: zod_1.z.string().min(1),
magentoStoreCode: zod_1.z.string().min(1)
return _zod.z.object({
canonicalBaseUrl: _zod.z.string().nullish(),
cartDisplayPricesInclTax: _zod.z.boolean().nullish(),
defaultLocale: _zod.z.boolean().nullish(),
domain: _zod.z.string().nullish(),
googleAnalyticsId: _zod.z.string().nullish(),
googleRecaptchaKey: _zod.z.string().nullish(),
googleTagmanagerId: _zod.z.string().nullish(),
hygraphLocales: _zod.z.array(_zod.z.string().min(1)).nullish(),
linguiLocale: _zod.z.string().nullish(),
locale: _zod.z.string().min(1),
magentoStoreCode: _zod.z.string().min(1)
});
}
exports.GraphCommerceStorefrontConfigSchema = GraphCommerceStorefrontConfigSchema;
function MagentoConfigurableVariantValuesSchema() {
return zod_1.z.object({
content: zod_1.z.boolean().nullish(),
gallery: zod_1.z.boolean().nullish(),
url: zod_1.z.boolean().nullish()
return _zod.z.object({
content: _zod.z.boolean().nullish(),
gallery: _zod.z.boolean().nullish(),
url: _zod.z.boolean().nullish()
});
}
exports.MagentoConfigurableVariantValuesSchema = MagentoConfigurableVariantValuesSchema;
function RecentlyViewedProductsConfigSchema() {
return zod_1.z.object({
enabled: zod_1.z.boolean().nullish(),
maxCount: zod_1.z.number().nullish()
return _zod.z.object({
enabled: _zod.z.boolean().nullish(),
maxCount: _zod.z.number().nullish()
});
}
exports.RecentlyViewedProductsConfigSchema = RecentlyViewedProductsConfigSchema;
function SidebarGalleryConfigSchema() {
return zod_1.z.object({
paginationVariant: exports.SidebarGalleryPaginationVariantSchema.nullish()
return _zod.z.object({
paginationVariant: SidebarGalleryPaginationVariantSchema.nullish()
});
}
exports.SidebarGalleryConfigSchema = SidebarGalleryConfigSchema;

0 comments on commit c8633d4

Please sign in to comment.