Skip to content

Commit

Permalink
Rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
stellarhoof committed Jul 11, 2023
1 parent 768f78f commit f8d2bcd
Show file tree
Hide file tree
Showing 45 changed files with 75 additions and 74 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ cd packages/tree-utils && yarn run -T vitest
# From any directory, specifying workspace
# > yarn workspace {workspace} run -T {cmd}
# Ex:
yarn workspace @json-schema-form/tree-utils run -T vitest .
yarn workspace @json-schema-forms/tree-utils run -T vitest .
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "json-schema-form",
"name": "json-schema-forms",
"private": true,
"version": "0.1.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import parser from "prettier/parser-typescript.js"
import { ChakraProvider, extendTheme } from "@chakra-ui/react"
import { Preview } from "@storybook/react"
import { Title, Subtitle, Description, Stories } from "@storybook/blocks"
import { FormComponentsProvider } from "@json-schema-form/react"
import { FormComponentsProvider } from "@json-schema-forms/react"
import { theme, controls, layouts } from "../src/index.js"

const preview: Preview = {
Expand Down
10 changes: 5 additions & 5 deletions packages/chakra-mobx/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@json-schema-form/chakra-mobx",
"name": "@json-schema-forms/chakra-mobx",
"license": "MIT",
"version": "0.1.0",
"repository": {
"type": "git",
"url": "git+https://github.com/stellarhoof/json-schema-form.git"
"url": "git+https://github.com/stellarhoof/json-schema-forms.git"
},
"type": "module",
"exports": {
Expand All @@ -24,8 +24,8 @@
"@chakra-ui/react": "^2.5.5",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@json-schema-form/core": "workspace:^",
"@json-schema-form/react": "workspace:^",
"@json-schema-forms/core": "workspace:^",
"@json-schema-forms/react": "workspace:^",
"framer-motion": "^10.9.1",
"lodash": "^4.17.21",
"mobx-react-lite": "^3.4.3",
Expand All @@ -38,7 +38,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@json-schema-form/validator-ajv": "workspace:^",
"@json-schema-forms/validator-ajv": "workspace:^",
"@storybook/addon-essentials": "^7.0.25",
"@storybook/addon-interactions": "^7.0.25",
"@storybook/addon-links": "^7.0.25",
Expand Down
4 changes: 2 additions & 2 deletions packages/chakra-mobx/src/Arrays.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { observable } from "mobx"
import { createForm } from "@json-schema-form/core"
import { Field, ReactField, ReactFieldProps } from "@json-schema-form/react"
import { createForm } from "@json-schema-forms/core"
import { Field, ReactField, ReactFieldProps } from "@json-schema-forms/react"

const meta = {
title: "Arrays",
Expand Down
6 changes: 3 additions & 3 deletions packages/chakra-mobx/src/Form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { useState } from "react"
import { observable, reaction } from "mobx"
import { Center, chakra } from "@chakra-ui/react"
import { ErrorObject } from "ajv"
import { validate } from "@json-schema-form/validator-ajv"
import { FormSchema, createForm } from "@json-schema-form/core"
import { useForm, Field, ReactFieldProps } from "@json-schema-form/react"
import { validate } from "@json-schema-forms/validator-ajv"
import { FormSchema, createForm } from "@json-schema-forms/core"
import { useForm, Field, ReactFieldProps } from "@json-schema-forms/react"
import Submit from "./Submit.js"

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/NotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
AlertDescription,
AlertProps,
} from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & AlertProps

Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/Submit.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { observer } from "mobx-react-lite"
import { Button, ButtonProps } from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & ButtonProps

Expand Down
4 changes: 2 additions & 2 deletions packages/chakra-mobx/src/controls.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { observable } from "mobx"
import { Meta, StoryObj } from "@storybook/react"
import { createForm } from "@json-schema-form/core"
import { createForm } from "@json-schema-forms/core"
import controls from "./controls.js"

/**
* ```javascript
* import { controls } from '@json-schema-form/chakra-mobx'
* import { controls } from '@json-schema-forms/chakra-mobx'
* ```
*/
const meta: Meta = {
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/controls.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormComponentsContextType } from "@json-schema-form/react"
import { FormComponentsContextType } from "@json-schema-forms/react"
import Checkbox from "./controls/Checkbox.js"
import ChildrenGrid from "./controls/ChildrenGrid.js"
import Input from "./controls/Input.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/controls/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ForwardedRef, forwardRef } from "react"
import { observer } from "mobx-react-lite"
import { CheckboxProps, Checkbox } from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & CheckboxProps

Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/controls/ChildrenGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ForwardedRef, forwardRef } from "react"
import { observer } from "mobx-react-lite"
import { Grid, GridProps } from "@chakra-ui/react"
import { Field, ReactField } from "@json-schema-form/react"
import { Field, ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & GridProps

Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/controls/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { forwardRef, ForwardedRef } from "react"
import { observer } from "mobx-react-lite"
import { Input, InputProps } from "@chakra-ui/react"
import { getFieldInputType, ReactField } from "@json-schema-form/react"
import { getFieldInputType, ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & InputProps

Expand Down
4 changes: 2 additions & 2 deletions packages/chakra-mobx/src/controls/NumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
NumberIncrementStepper,
NumberDecrementStepper,
} from "@chakra-ui/react"
import { Field } from "@json-schema-form/core"
import { ReactField } from "@json-schema-form/react"
import { Field } from "@json-schema-forms/core"
import { ReactField } from "@json-schema-forms/react"

export const useNumberSchema = (schema: Field["schema"]) => {
if (schema.type !== "number" && schema.type !== "integer") {
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/controls/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
OptionsRadioGroup,
Props as OptionsRadioGroupProps,
} from "./shared/OptionsRadioGroup.js"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & OptionsRadioGroupProps

Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/controls/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ForwardedRef, forwardRef } from "react"
import { observer } from "mobx-react-lite"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"
import {
OptionsSelect,
Props as OptionsSelectProps,
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/controls/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
SliderThumb,
SliderProps,
} from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"
import { useNumberSchema } from "./NumberInput.js"

type Props<P extends object> = { field: ReactField<P> } & SliderProps
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/controls/Switch.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ForwardedRef, forwardRef } from "react"
import { observer } from "mobx-react-lite"
import { SwitchProps, Switch } from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & SwitchProps

Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/controls/Textarea.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ForwardedRef, forwardRef } from "react"
import { observer } from "mobx-react-lite"
import { TextareaProps, Textarea } from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & TextareaProps

Expand Down
4 changes: 2 additions & 2 deletions packages/chakra-mobx/src/layouts.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { StoryObj } from "@storybook/react"
import { createForm } from "@json-schema-form/core"
import { createForm } from "@json-schema-forms/core"
import layouts from "./layouts.js"
import { observable } from "mobx"

/**
* ```javascript
* import { layouts } from '@json-schema-form/chakra-mobx'
* import { layouts } from '@json-schema-forms/chakra-mobx'
* ```
*/
const meta = {
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/layouts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormComponentsContextType } from "@json-schema-form/react"
import { FormComponentsContextType } from "@json-schema-forms/react"
import NotFound from "./NotFound.js"
import Default from "./layouts/Default.js"
import Form from "./layouts/Form.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/chakra-mobx/src/layouts/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ForwardedRef, forwardRef } from "react"
import { FormControlProps, useMultiStyleConfig } from "@chakra-ui/react"
import { Control, ReactField } from "@json-schema-form/react"
import { Control, ReactField } from "@json-schema-forms/react"
import FormControl from "./shared/FormControl.js"
import Title from "./shared/Title.js"
import Description from "./shared/Description.js"
Expand All @@ -10,7 +10,7 @@ type Props<P extends object> = { field: ReactField<P> } & FormControlProps

export default forwardRef(
<P extends object>({ field, ...props }: Props<P>, ref: ForwardedRef<any>) => {
const css = useMultiStyleConfig("@json-schema-form/layouts/Checkbox", props)
const css = useMultiStyleConfig("@json-schema-forms/layouts/Checkbox", props)
return (
<FormControl field={field} sx={css.container} {...props}>
<Control ref={ref} field={field} sx={css.control}>
Expand Down
4 changes: 2 additions & 2 deletions packages/chakra-mobx/src/layouts/Default.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ForwardedRef, forwardRef } from "react"
import { FormControlProps, useMultiStyleConfig } from "@chakra-ui/react"
import { Control, ReactField } from "@json-schema-form/react"
import { Control, ReactField } from "@json-schema-forms/react"
import FormControl from "./shared/FormControl.js"
import Title from "./shared/Title.js"
import Description from "./shared/Description.js"
Expand All @@ -11,7 +11,7 @@ type Props<P extends object> = { field: ReactField<P> } & FormControlProps

export default forwardRef(
<P extends object>({ field, ...props }: Props<P>, ref: ForwardedRef<any>) => {
const css = useMultiStyleConfig("@json-schema-form/layouts/Default", props)
const css = useMultiStyleConfig("@json-schema-forms/layouts/Default", props)
return (
<FormControl field={field} sx={css.container} {...props}>
<Title field={field} sx={css.label}>
Expand Down
4 changes: 2 additions & 2 deletions packages/chakra-mobx/src/layouts/Fieldset.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ForwardedRef, forwardRef } from "react"
import { FormControlProps, useMultiStyleConfig } from "@chakra-ui/react"
import { Control, ReactField } from "@json-schema-form/react"
import { Control, ReactField } from "@json-schema-forms/react"
import FormControl from "./shared/FormControl.js"
import Title from "./shared/Title.js"
import Description from "./shared/Description.js"
Expand All @@ -12,7 +12,7 @@ type Props<P extends object> = { field: ReactField<P> } & FormControlProps

export default forwardRef(
<P extends object>({ field, ...props }: Props<P>, ref: ForwardedRef<any>) => {
const css = useMultiStyleConfig("@json-schema-form/layouts/Fieldset", props)
const css = useMultiStyleConfig("@json-schema-forms/layouts/Fieldset", props)
return (
<FormControl as="fieldset" field={field} sx={css.container} {...props}>
<Title as="legend" field={field} sx={css.label}>
Expand Down
4 changes: 2 additions & 2 deletions packages/chakra-mobx/src/layouts/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ForwardedRef, forwardRef } from "react"
import { FormControlProps, useMultiStyleConfig } from "@chakra-ui/react"
import { Control, ReactField } from "@json-schema-form/react"
import { Control, ReactField } from "@json-schema-forms/react"
import FormControl from "./shared/FormControl.js"
import Title from "./shared/Title.js"
import Description from "./shared/Description.js"
Expand All @@ -10,7 +10,7 @@ type Props<P extends object> = { field: ReactField<P> } & FormControlProps

export default forwardRef(
<P extends object>({ field, ...props }: Props<P>, ref: ForwardedRef<any>) => {
const css = useMultiStyleConfig("@json-schema-form/layouts/Form", props)
const css = useMultiStyleConfig("@json-schema-forms/layouts/Form", props)
return (
<FormControl as="fieldset" field={field} sx={css.container} {...props}>
<Title field={field} sx={css.label} />
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/layouts/shared/Description.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FormHelperText, FormHelperTextProps } from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & FormHelperTextProps

Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/layouts/shared/Errors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
FormErrorMessage,
FormErrorIcon,
} from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & BoxProps

Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/layouts/shared/FormControl.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { observer } from "mobx-react-lite"
import { FormControl, FormControlProps } from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

type Props<P extends object> = { field: ReactField<P> } & FormControlProps

Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/layouts/shared/RemoveChild.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Omit } from "utility-types"
import { observer } from "mobx-react-lite"
import { Icon, Button, ButtonProps } from "@chakra-ui/react"
import { MdDelete } from "react-icons/md/index.js"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"

export default observer(
<P extends object>({
Expand Down
2 changes: 1 addition & 1 deletion packages/chakra-mobx/src/layouts/shared/Title.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { chakra, FormLabel, FormLabelProps } from "@chakra-ui/react"
import { ReactField } from "@json-schema-form/react"
import { ReactField } from "@json-schema-forms/react"
import { observer } from "mobx-react-lite"

type Props<P extends object> = { field: ReactField<P> } & FormLabelProps
Expand Down
8 changes: 4 additions & 4 deletions packages/chakra-mobx/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const components = {
},
},
},
"@json-schema-form/layouts/Form": {
"@json-schema-forms/layouts/Form": {
parts: ["container", "label", "description", "control", "errors"],
baseStyle: {
label: {
Expand All @@ -30,7 +30,7 @@ const components = {
},
},
},
"@json-schema-form/layouts/Fieldset": {
"@json-schema-forms/layouts/Fieldset": {
parts: [
"container",
"label",
Expand Down Expand Up @@ -74,7 +74,7 @@ const components = {
},
},
},
"@json-schema-form/layouts/Default": {
"@json-schema-forms/layouts/Default": {
parts: [
"container",
"label",
Expand All @@ -96,7 +96,7 @@ const components = {
},
},
},
"@json-schema-form/layouts/Checkbox": {
"@json-schema-forms/layouts/Checkbox": {
parts: ["container", "label", "description", "control", "errors"],
baseStyle: {
label: {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@json-schema-form/core",
"name": "@json-schema-forms/core",
"license": "MIT",
"version": "0.1.0",
"repository": {
"type": "git",
"url": "git+https://github.com/stellarhoof/json-schema-form.git"
"url": "git+https://github.com/stellarhoof/json-schema-forms.git"
},
"type": "module",
"exports": {
Expand All @@ -20,7 +20,7 @@
"prepack": "yarn run -T build"
},
"dependencies": {
"@json-schema-form/tree-utils": "workspace:^",
"@json-schema-forms/tree-utils": "workspace:^",
"json-schema-utils": "workspace:^",
"lodash": "^4.17.21"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/createField.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from "lodash/fp.js"
import { get, set } from "lodash"
import { Required } from "utility-types"
import { Collection, Tree } from "@json-schema-form/tree-utils"
import { Collection, Tree } from "@json-schema-forms/tree-utils"
import {
JsonSchema,
getSchemaValue,
Expand Down
Loading

0 comments on commit f8d2bcd

Please sign in to comment.