Skip to content
This repository was archived by the owner on Aug 23, 2021. It is now read-only.
Open
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
9 changes: 9 additions & 0 deletions .changeset/cool-yaks-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'tina-cloud-starter': patch
'tina-cloud-starter-experimental': patch
'next-tinacms-cloudinary': patch
'tina-graphql-gateway': patch
'@tinacms/toolkit': patch
---

Uses @tinacms/toolkit, which is the merged version of what has traditionally been the tinacms package"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package.tgz

builds/*
!builds/.gitkeep
build

out

Expand Down
4,272 changes: 1,561 additions & 2,711 deletions .pnp.js

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
76 changes: 38 additions & 38 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,36 +53,48 @@ packageExtensions:
"@octokit/core": ^3.3.0
graphql: ^14.6.0
subscriptions-transport-ws: ^0.9.18
"@tinacms/fields@*":
peerDependencies:
"@tinacms/form-builder": latest
"@tinacms/icons": latest
"@tinacms/react-core": latest
"@tinacms/react-forms": latest
"@tinacms/styles": latest
prop-types: ">=15"
react-beautiful-dnd: ^11.0.5
react-dismissible: ^1.3.0
"@tinacms/form-builder@*":
peerDependencies:
final-form: ^4.18.2
react-beautiful-dnd: ^11.0.5
react-dom: ^16.13.0
react-dismissible: ^1.3.0
"@tinacms/icons@*":
peerDependencies:
react: ^16.13.0
"@tinacms/react-forms@*":
peerDependencies:
final-form: ^4.18.2
prop-types: ">=15"
"@tinacms/react-toolbar@*":
# "@tinacms/fields@*":
# peerDependencies:
# "@tinacms/form-builder": latest
# "@tinacms/icons": latest
# "@tinacms/react-core": latest
# "@tinacms/react-forms": latest
# "@tinacms/styles": latest
# prop-types: ">=15"
# react-beautiful-dnd: ^11.0.5
# react-dismissible: ^1.3.0
# "@tinacms/form-builder@*":
# peerDependencies:
# final-form: ^4.18.2
# react-beautiful-dnd: ^11.0.5
# react-dom: ^16.13.0
# react-dismissible: ^1.3.0
# "@tinacms/icons@*":
# peerDependencies:
# react: ^16.13.0
# "@tinacms/react-forms@*":
# peerDependencies:
# final-form: ^4.18.2
# prop-types: ">=15"
# "@tinacms/react-toolbar@*":
# peerDependencies:
# react-beautiful-dnd: ^11.0.5
# react-dom: ^16.13.0
# "@tinacms/styles@*":
# peerDependencies:
# react: ^16.13.0
react-beautiful-dnd@*:
peerDependencies:
react-beautiful-dnd: ^11.0.5
react-dom: ^16.13.0
"@tinacms/styles@*":
react-dismissible@*:
peerDependencies:
react: ^16.13.0
# tinacms@*:
# dependencies:
# final-form: ^4.18.2
# prop-types: ">=15"
# react-beautiful-dnd: ^11.0.5
# react-dismissible: ^1.3.0
codemirror-graphql@*:
dependencies:
graphql-language-service-utils: ^2.4.4
Expand All @@ -95,18 +107,6 @@ packageExtensions:
next@9.4.2:
dependencies:
typescript: ^4.0.3
react-beautiful-dnd@*:
peerDependencies:
react-dom: ^16.13.0
react-dismissible@*:
peerDependencies:
react: ^16.13.0
tinacms@*:
dependencies:
final-form: ^4.18.2
prop-types: ">=15"
react-beautiful-dnd: ^11.0.5
react-dismissible: ^1.3.0
tsup@*:
dependencies:
typescript: ^4.0.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ import { TinaCloudCloudinaryMediaStore } from 'next-tinacms-cloudinary'
const TinaWrapper = (props) => {
return (
<TinaCloudProvider
clientId={process.env.NEXT_PUBLIC_TINA_CLIENT_ID}
clientId=""
branch="main"
isLocalClient={Boolean(Number(process.env.NEXT_PUBLIC_USE_LOCAL_CLIENT))}
organization={process.env.NEXT_PUBLIC_ORGANIZATION_NAME}
mediaStore={TinaCloudCloudinaryMediaStore}
isLocalClient={true}
organization=""
// clientId={process.env.NEXT_PUBLIC_TINA_CLIENT_ID}
// branch="main"
// isLocalClient={Boolean(Number(process.env.NEXT_PUBLIC_USE_LOCAL_CLIENT))}
// organization={process.env.NEXT_PUBLIC_ORGANIZATION_NAME}
// mediaStore={TinaCloudCloudinaryMediaStore}
>
<Inner {...props} />
</TinaCloudProvider>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
blocks:
- messageHeader: Welcome to the Tina Cloud Starter
- messageHeader: Welcome to the Tina Cloud Starter!
messageBody: >
The Tina Cloud project is an opinionated approach to working with the
TinaCMS system that enables you to focus on building sites the way you're
Expand Down
1 change: 0 additions & 1 deletion examples/tina-cloud-starter-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"styled-jsx": "^3.2.5",
"tina-cloud-next": "workspace:*",
"tina-graphql-gateway": "workspace:*",
"tinacms": "^0.43.0",
"typescript": "^3.8.3"
}
}
4 changes: 4 additions & 0 deletions examples/tina-cloud-starter/.tina/__generated__/schema.gql

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

12 changes: 7 additions & 5 deletions examples/tina-cloud-starter/components/tina-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { TinaCloudProvider } from 'tina-graphql-gateway'
import React from 'react'
import { useGraphqlForms } from 'tina-graphql-gateway'
import { LoadingPage } from './Spinner'
import { TinaCloudCloudinaryMediaStore } from 'next-tinacms-cloudinary'

/**
* This gets loaded dynamically in "pages/_app.js"
Expand All @@ -24,11 +23,14 @@ import { TinaCloudCloudinaryMediaStore } from 'next-tinacms-cloudinary'
const TinaWrapper = (props) => {
return (
<TinaCloudProvider
clientId={process.env.NEXT_PUBLIC_TINA_CLIENT_ID}
// clientId={process.env.NEXT_PUBLIC_TINA_CLIENT_ID}
// branch="main"
// isLocalClient={Boolean(Number(process.env.NEXT_PUBLIC_USE_LOCAL_CLIENT))}
// organization={process.env.NEXT_PUBLIC_ORGANIZATION_NAME}
clientId=""
branch="main"
isLocalClient={Boolean(Number(process.env.NEXT_PUBLIC_USE_LOCAL_CLIENT))}
organization={process.env.NEXT_PUBLIC_ORGANIZATION_NAME}
mediaStore={TinaCloudCloudinaryMediaStore}
isLocalClient={true}
organization=""
>
<Inner {...props} />
</TinaCloudProvider>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
blocks:
- template: message
messageHeader: Welcome to the Tina Cloud Starter
messageHeader: Welcome to the Tina Cloud Starters
messageBody: >
The Tina Cloud project is an opinionated approach to working with the
TinaCMS system that enables you to focus on building sites the way you're
Expand Down
3 changes: 0 additions & 3 deletions examples/tina-cloud-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@
"cloudinary-core": "^2.11.4",
"lodash": "^4.17.21",
"next": "10.0.5",
"next-tinacms-cloudinary": "workspace:*",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-is": "^17.0.2",
"react-markdown": "^5.0.3",
"styled-components": "^5.1.3",
"styled-jsx": "^3.2.5",
"tina-cloud-next": "workspace:*",
"tina-graphql-gateway": "workspace:*",
"tinacms": "^0.43.0",
"typescript": "^3.8.3"
}
}
8 changes: 4 additions & 4 deletions packages/next-tinacms-cloudinary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"tsup": "^3.7.0"
},
"devDependencies": {
"@tinacms/toolkit": "workspace:*",
"@types/crypto-js": "^3.1.47",
"@types/js-cookie": "^2.2.6",
"@types/node": "^13.13.1",
Expand All @@ -26,16 +27,15 @@
"react": "16.13.1",
"react-dom": "16.13.1",
"styled-components": "^5.2.0",
"tina-graphql-gateway": "workspace:*",
"tinacms": "^0.43.0"
"tina-graphql-gateway": "workspace:*"
},
"peerDependencies": {
"@tinacms/toolkit": "*",
"react": ">=16.8",
"react-dom": ">=16.8",
"react-is": "^16.13.1 || <18.0.0",
"styled-components": "*",
"tina-graphql-gateway": ">=0.4.0",
"tinacms": "^0.43.0"
"tina-graphql-gateway": ">=0.4.0"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
MediaListOptions,
MediaStore,
MediaUploadOptions,
} from 'tinacms'
} from '@tinacms/toolkit'

import { E_UNAUTHORIZED, E_BAD_ROUTE, interpretErrorMessage } from './errors'

Expand Down
2 changes: 1 addition & 1 deletion packages/next-tinacms-cloudinary/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { MediaListError } from 'tinacms'
import { MediaListError } from '@tinacms/toolkit'

export const E_DEFAULT = new MediaListError({
title: 'An Error Occurred',
Expand Down
2 changes: 1 addition & 1 deletion packages/next-tinacms-cloudinary/src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ limitations under the License.
*/

import { v2 as cloudinary } from 'cloudinary'
import { Media, MediaListOptions } from 'tinacms'
import { Media, MediaListOptions } from '@tinacms/toolkit'
import path from 'path'
import { NextApiRequest, NextApiResponse } from 'next'
import multer from 'multer'
Expand Down
23 changes: 3 additions & 20 deletions packages/tina-graphql-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@graphql-codegen/core": "^1.15.4",
"@graphql-codegen/typescript": "^1.15.4",
"@graphql-codegen/typescript-operations": "^1.15.4",
"@tinacms/toolkit": "0.43.0-beta.3",
"@types/lodash": "^4.14.169",
"@types/node": "^14.0.13",
"@types/react": "^16.9.38",
Expand Down Expand Up @@ -45,34 +46,16 @@
"yup": "^0.32.0"
},
"devDependencies": {
"@tinacms/core": "^0.31.0",
"@tinacms/forms": "^0.38.0",
"@tinacms/icons": "^0.7",
"@tinacms/react-core": "^0.2",
"@tinacms/form-builder": "^0.43.0",
"@tinacms/react-modals": "^0.1",
"@tinacms/styles": "^0.29.0",
"@types/crypto-js": "^3.1.47",
"@types/styled-components": "^5.1.3",
"next": "9.4.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"styled-components": "^5.2.0",
"tinacms": "^0.31.0"
"styled-components": "^5.2.0"
},
"peerDependencies": {
"@tinacms/core": "^0.31.0",
"@tinacms/forms": "^0.38.0",
"@tinacms/icons": "^0.7",
"@tinacms/react-core": "^0.2",
"@tinacms/form-builder": "^0.43.0",
"@tinacms/react-modals": "^0.1",
"@tinacms/styles": "^0.29.0",
"react": ">=16.8",
"react-dom": ">=16.8",
"react-is": "^16.13.1 || <18.0.0",
"styled-components": "*",
"tinacms": "^0.31.0"
"styled-components": "*"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
6 changes: 2 additions & 4 deletions packages/tina-graphql-gateway/src/auth/AuthModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ import {
ModalHeader,
ModalBody,
ModalActions,
} from 'tinacms'
import { StyleReset } from '@tinacms/styles'
} from '@tinacms/toolkit'
import { StyleReset, LoadingDots, Button } from '@tinacms/toolkit'
import React, { useCallback, useState } from 'react'
import { LoadingDots } from '@tinacms/form-builder'
import { Button } from '@tinacms/styles'
import styled from 'styled-components'

interface ModalBuilderProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ limitations under the License.

import { ModalBuilder } from './AuthModal'
import React, { useState } from 'react'
import { TinaCMS, TinaProvider, MediaStore } from 'tinacms'
import { TinaCMS, TinaProvider, MediaStore } from '@tinacms/toolkit'

import { Client } from '../client'
import type { TokenObject } from './authenticate'
Expand Down
2 changes: 0 additions & 2 deletions packages/tina-graphql-gateway/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ export class Client {
}
}

export { ForestryMediaStore } from './media-store'

export const DEFAULT_LOCAL_TINA_GQL_SERVER_URL = 'http://localhost:4001/graphql'

export class LocalClient extends Client {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { AddContentPlugin, Field, TinaCMS } from 'tinacms'
import { AddContentPlugin, Field, TinaCMS } from '@tinacms/toolkit'

type CollectionShape = {
label: string
Expand Down
3 changes: 2 additions & 1 deletion packages/tina-graphql-gateway/src/hooks/form-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
sendParent,
} from 'xstate'
import { splitQuery } from 'tina-graphql-helpers'
import { Form, TinaCMS } from 'tinacms'
import { Form, TinaCMS } from '@tinacms/toolkit'

import type { Client } from '../client'
import type { DocumentNode } from './use-graphql-forms'
Expand Down Expand Up @@ -344,6 +344,7 @@ ${mutation}
}

const createForm = (formConfig) => {
console.log('form', Form)
const form = new Form(formConfig)
context.cms.plugins.add(form)
return form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License.
import finalFormArrays from 'final-form-arrays'
import { getIn, setIn } from 'final-form'
import type { NodeFormEvent, NodeFormContext } from './form-service'
import type { Form } from 'tinacms'
import type { Form } from '@tinacms/toolkit'

export const fixMutators = (args: {
context: NodeFormContext
Expand Down Expand Up @@ -50,8 +50,11 @@ export const fixMutators = (args: {
}

const {
// @ts-ignore
move: moveCopy,
// @ts-ignore
remove: removeCopy,
// @ts-ignore
insert: insertCopy,
} = {
...form.finalForm.mutators,
Expand Down
Loading