Skip to content

Commit

Permalink
Release@main
Browse files Browse the repository at this point in the history
  • Loading branch information
primeinteger authored Nov 8, 2024
2 parents 150c6c7 + 482ea60 commit 49d5618
Show file tree
Hide file tree
Showing 21 changed files with 366 additions and 965 deletions.
228 changes: 116 additions & 112 deletions examples/next-app-router/package-lock.json

Large diffs are not rendered by default.

228 changes: 116 additions & 112 deletions examples/next-pages-router/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"npmClient": "npm",
"version": "1.21.0",
"version": "1.22.0-beta.0",
"command": {
"version": {
"allowBranch": ["main", "next", "development"],
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentful/experiences-components-react",
"version": "1.21.0",
"version": "1.22.0-beta.0",
"description": "A basic set of components to use with Studio Experiences",
"homepage": "https://github.com/contentful/experience-builder/tree/next/packages/components#readme",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentful/experiences-core",
"version": "1.21.0",
"version": "1.22.0-beta.0",
"description": "",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
7 changes: 7 additions & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ export type ExperienceTreeNode = {
dataSource: ExperienceDataSource;
unboundValues: ExperienceUnboundValues;
breakpoints: Breakpoint[];
pattern?: {
id: string;
nodeId: string;
nodeLocation: string;
isVisibilityPropertyExposed: boolean;
variableNameToComponentValueKeyMap: Record<string, string>;
};
};
children: ExperienceTreeNode[];
parentId?: string;
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ export * from './isLinkToAsset';
export * from './isLink';
export * from './pathSchema';
export * from './resolveHyperlinkPattern';
export * from './patternUtils';
export * from './sanitizeNodeProps';
95 changes: 0 additions & 95 deletions packages/core/src/utils/patternUtils.spec.ts

This file was deleted.

65 changes: 0 additions & 65 deletions packages/core/src/utils/patternUtils.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/create-contentful-studio-experiences/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-contentful-studio-experiences",
"version": "1.21.0",
"version": "1.22.0-beta.0",
"description": "A CLI tool to get up and running with Contentful Studio Experiences quickly",
"homepage": "https://github.com/contentful/experience-builder/tree/next/packages/create-contentful-studio-experiences#readme",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/experience-builder-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentful/experiences-sdk-react",
"version": "1.21.0",
"version": "1.22.0-beta.0",
"main": "./dist/index.js",
"module": "./dist/index.js",
"typings": "./dist/src/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/experience-builder-sdk/src/core/sdkFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
export const sdkFeatures: Record<string, unknown> = {
hasSDKVersionUI: true,
cfVisibility: true,
patternResolution: true,
};
2 changes: 1 addition & 1 deletion packages/validators/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentful/experiences-validators",
"version": "1.21.0",
"version": "1.22.0-beta.0",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/visual-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentful/experiences-visual-editor-react",
"version": "1.21.0",
"version": "1.22.0-beta.0",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
15 changes: 1 addition & 14 deletions packages/visual-editor/src/hooks/useComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useMemo } from 'react';
import { useComponentProps } from './useComponentProps';
import { ASSEMBLY_NODE_TYPE } from '@contentful/experiences-core/constants';
import { Assembly } from '@contentful/experiences-components-react';
import { resolveAssembly } from '@/utils/assemblyUtils';
import { componentRegistry, createAssemblyRegistration } from '@/store/registries';
import { useEntityStore } from '@/store/entityStore';
import { ImportedComponentErrorBoundary } from '@components/DraggableHelpers/ImportedComponentErrorBoundary';
Expand All @@ -25,24 +24,12 @@ type UseComponentProps = {
};

export const useComponent = ({
node: rawNode,
node,
resolveDesignValue,
renderDropzone,
userIsDragging,
}: UseComponentProps) => {
const areEntitiesFetched = useEntityStore((state) => state.areEntitiesFetched);
const entityStore = useEntityStore((state) => state.entityStore);

const node = useMemo(() => {
if (rawNode.type === ASSEMBLY_NODE_TYPE && areEntitiesFetched) {
return resolveAssembly({
node: rawNode,
entityStore,
});
}

return rawNode;
}, [areEntitiesFetched, rawNode, entityStore]);

const componentRegistration: ComponentRegistration | undefined = useMemo(() => {
let registration = componentRegistry.get(node.data.blockId!);
Expand Down
Loading

0 comments on commit 49d5618

Please sign in to comment.