@tinacms/app 0.0.0-20230516185052 → 0.0.0-20230516192308

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,14 +1,14 @@
1
1
  # @tinacms/app
2
2
 
3
- ## 0.0.0-20230516185052
3
+ ## 0.0.0-20230516192308
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - 7f95c1ce5: Reorganize the way fields are presented on the form to allow for deep-linking
8
8
  - Updated dependencies [b3d98d159]
9
9
  - Updated dependencies [7f95c1ce5]
10
- - @tinacms/toolkit@0.0.0-20230516185052
11
- - tinacms@0.0.0-20230516185052
10
+ - @tinacms/toolkit@0.0.0-20230516192308
11
+ - tinacms@0.0.0-20230516192308
12
12
 
13
13
  ## 1.2.12
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/app",
3
- "version": "0.0.0-20230516185052",
3
+ "version": "0.0.0-20230516192308",
4
4
  "main": "src/main.tsx",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
@@ -28,7 +28,7 @@
28
28
  "typescript": "^4.6.4",
29
29
  "zod": "^3.14.3",
30
30
  "@tinacms/mdx": "1.3.10",
31
- "@tinacms/toolkit": "0.0.0-20230516185052",
32
- "tinacms": "0.0.0-20230516185052"
31
+ "@tinacms/toolkit": "0.0.0-20230516192308",
32
+ "tinacms": "0.0.0-20230516192308"
33
33
  }
34
34
  }
@@ -179,11 +179,6 @@ export const useGraphQLReducer = (
179
179
  >([])
180
180
  const [operationIndex, setOperationIndex] = React.useState(0)
181
181
 
182
- const helper = React.useMemo(() => {
183
- const previewPlugins = cms.plugins.getType('preview-helper')
184
- return previewPlugins.find('preview-helper')
185
- }, [cms])
186
-
187
182
  React.useEffect(() => {
188
183
  const run = async () => {
189
184
  return Promise.all(
@@ -412,14 +407,6 @@ export const useGraphQLReducer = (
412
407
  )
413
408
  }
414
409
  }
415
- if (typeof value === 'string' && source?._tina_metadata) {
416
- // FIXME: hack to prevent breaking images
417
- if (helper) {
418
- const pathArray = G.responsePathAsArray(info.path)
419
-
420
- return helper.encode(pathArray.join('.'), value, payload.id)
421
- }
422
- }
423
410
  return value
424
411
  },
425
412
  })
@@ -494,6 +481,10 @@ export const useGraphQLReducer = (
494
481
  type: 'set-quick-editing-supported',
495
482
  value: event.data.value,
496
483
  })
484
+ iframe.current?.contentWindow?.postMessage({
485
+ type: 'quickEditEnabled',
486
+ value: cms.state.sidebarDisplayState === 'open',
487
+ })
497
488
  }
498
489
  if (event?.data?.type === 'isEditMode') {
499
490
  iframe?.current?.contentWindow?.postMessage({
@@ -564,9 +555,9 @@ export const useGraphQLReducer = (
564
555
  React.useEffect(() => {
565
556
  iframe.current?.contentWindow?.postMessage({
566
557
  type: 'quickEditEnabled',
567
- value: cms.state.quickEditEnabled,
558
+ value: cms.state.sidebarDisplayState === 'open',
568
559
  })
569
- }, [cms.state.quickEditEnabled])
560
+ }, [cms.state.sidebarDisplayState])
570
561
 
571
562
  React.useEffect(() => {
572
563
  cms.dispatch({ type: 'set-edit-mode', value: 'visual' })