Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move prop meta schema to sdk #4718

Merged
merged 2 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useState } from "react";
import type { Instance, Prop, Asset, Page } from "@webstudio-is/sdk";
import type { PropMeta } from "@webstudio-is/react-sdk";
import type { PropMeta, Instance, Prop, Asset, Page } from "@webstudio-is/sdk";
import { textVariants } from "@webstudio-is/design-system";
import { PropsSection } from "./props-section";
import { usePropsLogic } from "./use-props-logic";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { nanoid } from "nanoid";
import type { Instance, Prop } from "@webstudio-is/sdk";
import type { PropMeta, Instance, Prop } from "@webstudio-is/sdk";
import {
type PropMeta,
showAttribute,
textContentAttribute,
collectionComponent,
Expand Down
3 changes: 1 addition & 2 deletions apps/builder/app/builder/features/settings-panel/shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ import {
type ComponentProps,
} from "react";
import equal from "fast-deep-equal";
import type { PropMeta } from "@webstudio-is/react-sdk";
import {
decodeDataSourceVariable,
encodeDataSourceVariable,
} from "@webstudio-is/sdk";
import type { Prop, Asset } from "@webstudio-is/sdk";
import type { PropMeta, Prop, Asset } from "@webstudio-is/sdk";
import { InfoCircleIcon, MinusIcon } from "@webstudio-is/icons";
import {
SmallIconButton,
Expand Down
2 changes: 1 addition & 1 deletion packages/generate-arg-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@webstudio-is/html-data": "workspace:*",
"@webstudio-is/react-sdk": "workspace:*",
"@webstudio-is/sdk": "workspace:*",
"fast-glob": "^3.3.2",
"react-docgen-typescript": "^2.2.2",
"typescript": "5.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/generate-arg-types/src/arg-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PropItem } from "react-docgen-typescript";
import { PropMeta } from "@webstudio-is/react-sdk";
import { PropMeta } from "@webstudio-is/sdk";

export type FilterPredicate = (prop: PropItem) => boolean;

Expand Down
2 changes: 1 addition & 1 deletion packages/generate-arg-types/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type CustomDescriptionsType = {
continue;
}

let fileContent = `import type { PropMeta } from "@webstudio-is/react-sdk";\n`;
let fileContent = `import type { PropMeta } from "@webstudio-is/sdk";\n`;

if (componentDocs.length === 1) {
const argTypes = propsToArgTypes(
Expand Down
3 changes: 1 addition & 2 deletions packages/react-sdk/src/components/component-meta.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { z } from "zod";
import type { HtmlTags } from "html-tags";
import { Matchers } from "@webstudio-is/sdk";
import { PropMeta } from "../prop-meta";
import { Matchers, PropMeta } from "@webstudio-is/sdk";
import { EmbedTemplateStyleDecl, WsEmbedTemplate } from "../embed-template";

export type PresetStyle<Tag extends HtmlTags = HtmlTags> = Partial<
Expand Down
1 change: 0 additions & 1 deletion packages/react-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export * from "./remix";
export * from "./css/index";
export * from "./core-components";
export * from "./components/components-utils";
export { PropMeta } from "./prop-meta";
export {
type WsComponentPropsMeta,
type ComponentState,
Expand Down

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

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

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

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

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

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

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

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

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

Loading
Loading