@tinacms/app 1.2.45 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @tinacms/app
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 957fa26: Removed deprecated useTina hook
8
+ This was deprecated as part of the v1 release and shouldn't have been in use by anyone
9
+
10
+ ### Patch Changes
11
+
12
+ - f567fc8: More React 18 upgrades and fixes
13
+ - e58b951: update vulnerable packages so npm audit does not complain
14
+ - 957fa26: update to React 18
15
+ - 9076d09: update next js version from 12 to 14 in tinacms packages
16
+ - Updated dependencies [f567fc8]
17
+ - Updated dependencies [957fa26]
18
+ - Updated dependencies [e58b951]
19
+ - Updated dependencies [957fa26]
20
+ - Updated dependencies [9076d09]
21
+ - @tinacms/mdx@1.3.28
22
+ - tinacms@2.0.0
23
+
3
24
  ## 1.2.45
4
25
 
5
26
  ### Patch Changes
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@tinacms/app",
3
- "version": "1.2.45",
3
+ "version": "2.0.0",
4
4
  "main": "src/main.tsx",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@types/react": "17.0.2",
8
- "@types/react-dom": "17.0.2",
9
- "typescript": "^4.6.4"
7
+ "@types/react": "^18.3.3",
8
+ "@types/react-dom": "^18.3.0",
9
+ "typescript": "^5.5.3"
10
10
  },
11
11
  "dependencies": {
12
12
  "@graphiql/toolkit": "0.8.4",
@@ -17,12 +17,12 @@
17
17
  "graphiql": "3.0.0-alpha.1",
18
18
  "graphql": "15.8.0",
19
19
  "monaco-editor": "0.31.0",
20
- "react": "17.0.2",
21
- "react-dom": "17.0.2",
20
+ "react": "^18.3.1",
21
+ "react-dom": "^18.3.1",
22
22
  "react-router-dom": "6.3.0",
23
- "typescript": "^4.6.4",
23
+ "typescript": "^5.5.3",
24
24
  "zod": "^3.14.3",
25
- "@tinacms/mdx": "1.3.27",
26
- "tinacms": "1.6.7"
25
+ "@tinacms/mdx": "1.3.28",
26
+ "tinacms": "2.0.0"
27
27
  }
28
28
  }
package/src/App.tsx CHANGED
@@ -1,6 +1,5 @@
1
- import React, { Suspense, useEffect } from 'react'
1
+ import React, { Suspense } from 'react'
2
2
  import TinaCMS, { TinaAdmin, useCMS, MdxFieldPluginExtendible } from 'tinacms'
3
- import { TinaEditProvider, useEditState } from 'tinacms/dist/edit-state'
4
3
  import { Preview } from './preview'
5
4
  import Playground from './Playground'
6
5
 
@@ -74,19 +73,7 @@ export const TinaAdminWrapper = () => {
74
73
  )
75
74
  }
76
75
 
77
- const GoToEdit = () => {
78
- const { setEdit } = useEditState()
79
- useEffect(() => {
80
- setEdit(true)
81
- }, [])
82
- return <div>Going into edit mode</div>
83
- }
84
-
85
76
  function App() {
86
- return (
87
- <TinaEditProvider editMode={<TinaAdminWrapper />}>
88
- <GoToEdit />
89
- </TinaEditProvider>
90
- )
77
+ return <TinaAdminWrapper />
91
78
  }
92
79
  export default App
package/src/main.tsx CHANGED
@@ -1,15 +1,12 @@
1
- /**
2
-
3
- */
4
-
5
1
  import React from 'react'
6
- import ReactDOM from 'react-dom'
2
+ import { createRoot } from 'react-dom/client'
7
3
  import App from './App'
8
4
  import './index.css'
9
5
 
10
- ReactDOM.render(
6
+ const container = document.getElementById('root')
7
+ const root = createRoot(container!)
8
+ root.render(
11
9
  <React.StrictMode>
12
10
  <App />
13
- </React.StrictMode>,
14
- document.getElementById('root')
11
+ </React.StrictMode>
15
12
  )