@tinacms/app 0.0.0-572fb28-20251110050421 → 0.0.0-58f6dab-20251211010953

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,6 +1,85 @@
1
1
  # @tinacms/app
2
2
 
3
- ## 0.0.0-572fb28-20251110050421
3
+ ## 0.0.0-58f6dab-20251211010953
4
+
5
+ ### Patch Changes
6
+
7
+ - [#6211](https://github.com/tinacms/tinacms/pull/6211) [`3ffaa41`](https://github.com/tinacms/tinacms/commit/3ffaa41b39db568fcb3d25cecd6a76238704a186) Thanks [@Pat-Stuart](https://github.com/Pat-Stuart)! - ✨ Visual element highlighting between iframe and form
8
+
9
+ - Updated dependencies [[`3ffaa41`](https://github.com/tinacms/tinacms/commit/3ffaa41b39db568fcb3d25cecd6a76238704a186)]:
10
+ - tinacms@0.0.0-58f6dab-20251211010953
11
+
12
+ ## 2.3.15
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`998975c`](https://github.com/tinacms/tinacms/commit/998975cc8e3c71489f3ed6cbf9ca0a5a7619c18b), [`a125472`](https://github.com/tinacms/tinacms/commit/a125472d3278c140cb416dba5cd1478fb5dfe320), [`3097535`](https://github.com/tinacms/tinacms/commit/3097535275e813db907a592ee96bd8481f0eacc5), [`9fb397d`](https://github.com/tinacms/tinacms/commit/9fb397da515468f72b01f5a7cf881187a9c33d6e)]:
17
+ - tinacms@3.1.0
18
+ - @tinacms/mdx@2.0.1
19
+
20
+ ## 2.3.14
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [[`5c1e891`](https://github.com/tinacms/tinacms/commit/5c1e89181f595d392ad6cb56ca5fc0b6d9e60a23), [`f717193`](https://github.com/tinacms/tinacms/commit/f717193aa4a1d3205df42d120fd1f6192b5e41e5), [`ac59522`](https://github.com/tinacms/tinacms/commit/ac59522053c71c713057c4c2b6ce610617bce85e)]:
25
+ - tinacms@3.0.2
26
+ - @tinacms/mdx@2.0.0
27
+
28
+ ## 2.3.13
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [[`50fa9f4`](https://github.com/tinacms/tinacms/commit/50fa9f4bf932a3dc45b88d245e35917efe8d3423), [`428ec7e`](https://github.com/tinacms/tinacms/commit/428ec7eca20603e2cb666d562fd4cc16dda4cbed), [`6946476`](https://github.com/tinacms/tinacms/commit/69464767d339a5df3c6c530ece94ef80049e534f), [`f99bbbc`](https://github.com/tinacms/tinacms/commit/f99bbbc221eead8d714b3791348d415dd8fcd063)]:
33
+ - tinacms@3.0.1
34
+
35
+ ## 2.3.12
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies [[`2e1535d`](https://github.com/tinacms/tinacms/commit/2e1535dd5495dc390902f2db6ef1f26afb072396), [`ed6025e`](https://github.com/tinacms/tinacms/commit/ed6025ee87ebe051957fc93e987ba8de8b003995), [`3bf79e1`](https://github.com/tinacms/tinacms/commit/3bf79e19c005dca745a8ddd46546190741b322a5), [`bb1ad6a`](https://github.com/tinacms/tinacms/commit/bb1ad6a11d10976074453ed218b178935ec96fd3)]:
40
+ - @tinacms/mdx@2.0.0
41
+ - tinacms@3.0.0
42
+
43
+ ## 2.3.11
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies [[`a76fdb6`](https://github.com/tinacms/tinacms/commit/a76fdb639b94cfefa169ebbd184f55d62e4a8a76), [`dd2089d`](https://github.com/tinacms/tinacms/commit/dd2089dbde4a7b1a0116cce096f50a97fdca9d81)]:
48
+ - tinacms@2.10.1
49
+ - @tinacms/mdx@1.8.3
50
+
51
+ ## 2.3.10
52
+
53
+ ### Patch Changes
54
+
55
+ - [#5822](https://github.com/tinacms/tinacms/pull/5822) [`4b824be`](https://github.com/tinacms/tinacms/commit/4b824be53572f9231753ebd3b5f14fd778fd73d6) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Migrate from react-beautiful-dnd to dnd-kit to fix deprecation error.
56
+
57
+ - Updated dependencies [[`f2577b9`](https://github.com/tinacms/tinacms/commit/f2577b911a97ecc1c3f53a98ae8218cc33bc9867), [`3ffa092`](https://github.com/tinacms/tinacms/commit/3ffa0929e4964f17d5ffa05e0d4cbbff5d9ef4d9), [`38920ce`](https://github.com/tinacms/tinacms/commit/38920ce29a9b63c54b04f39537f19beab62d2c86), [`d1bd1a1`](https://github.com/tinacms/tinacms/commit/d1bd1a1312fa910e237ec06608e7c11830c78346), [`67e1a3d`](https://github.com/tinacms/tinacms/commit/67e1a3d4c52e0acdab0a8dc53956e39f2e3075fa), [`9fb1402`](https://github.com/tinacms/tinacms/commit/9fb1402491f52d16e763c875ee550f7d879c83c8), [`3fa1098`](https://github.com/tinacms/tinacms/commit/3fa109849f552406dd0059041afe0bf09edadb25), [`ccab7a5`](https://github.com/tinacms/tinacms/commit/ccab7a5d0fd1f4167e8f72306e9d32e8750ed9bf), [`4b824be`](https://github.com/tinacms/tinacms/commit/4b824be53572f9231753ebd3b5f14fd778fd73d6), [`d9487bf`](https://github.com/tinacms/tinacms/commit/d9487bff276ba20a84b76944c5a7a333666f4984)]:
58
+ - tinacms@2.10.0
59
+ - @tinacms/mdx@1.8.2
60
+
61
+ ## 2.3.9
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [[`d900f4e`](https://github.com/tinacms/tinacms/commit/d900f4e6c6f0a86c94bba5f0925bbaa54eeb90db)]:
66
+ - tinacms@2.9.5
67
+
68
+ ## 2.3.8
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [[`e1b6d05`](https://github.com/tinacms/tinacms/commit/e1b6d05c6b31c5c0928633064a065ddd331667ca), [`4ee0dd9`](https://github.com/tinacms/tinacms/commit/4ee0dd95913392b0da12dd5c9344909e5292e911), [`27e5ca9`](https://github.com/tinacms/tinacms/commit/27e5ca9b18a90f13f92425ebb2628b143d6a81be)]:
73
+ - tinacms@2.9.4
74
+
75
+ ## 2.3.7
76
+
77
+ ### Patch Changes
78
+
79
+ - Updated dependencies [[`9e8bc37`](https://github.com/tinacms/tinacms/commit/9e8bc37402c8aa4d408c38e00d4402d596b0d896), [`0f265aa`](https://github.com/tinacms/tinacms/commit/0f265aadf918ae6f5b789e298fc2c406a6df0b16), [`32bd9b2`](https://github.com/tinacms/tinacms/commit/32bd9b21b54462be3e83b2d3e4b4237a48758bb1), [`ce1414c`](https://github.com/tinacms/tinacms/commit/ce1414ce1b82e6755a96c9c12949cd469b43e283)]:
80
+ - tinacms@2.9.3
81
+
82
+ ## 2.3.6
4
83
 
5
84
  ### Patch Changes
6
85
 
@@ -8,8 +87,8 @@
8
87
 
9
88
  - [#6098](https://github.com/tinacms/tinacms/pull/6098) [`a2d983e`](https://github.com/tinacms/tinacms/commit/a2d983ed886f66db2c133e902eacaa8d07e88bdb) Thanks [@Pat-Stuart](https://github.com/Pat-Stuart)! - Change from blue accent coloring to orange
10
89
 
11
- - Updated dependencies [[`1286e87`](https://github.com/tinacms/tinacms/commit/1286e87323694dc819edc56360613dc654f3d3ca), [`4416a28`](https://github.com/tinacms/tinacms/commit/4416a283ac1cfea5e9c4890cd71f2edf3b704344), [`6cba118`](https://github.com/tinacms/tinacms/commit/6cba118c90f7c7ab6356c0ef83fca18526e47f8d), [`572fb28`](https://github.com/tinacms/tinacms/commit/572fb28236b56db4ede5fe53b177b80323ae7284), [`a2d983e`](https://github.com/tinacms/tinacms/commit/a2d983ed886f66db2c133e902eacaa8d07e88bdb), [`bc35474`](https://github.com/tinacms/tinacms/commit/bc354740d0cb359c372ba287974e7e9db3c5119c)]:
12
- - tinacms@0.0.0-572fb28-20251110050421
90
+ - Updated dependencies [[`1286e87`](https://github.com/tinacms/tinacms/commit/1286e87323694dc819edc56360613dc654f3d3ca), [`4416a28`](https://github.com/tinacms/tinacms/commit/4416a283ac1cfea5e9c4890cd71f2edf3b704344), [`6cba118`](https://github.com/tinacms/tinacms/commit/6cba118c90f7c7ab6356c0ef83fca18526e47f8d), [`572fb28`](https://github.com/tinacms/tinacms/commit/572fb28236b56db4ede5fe53b177b80323ae7284), [`f224124`](https://github.com/tinacms/tinacms/commit/f224124220811fb44749122d46eb7100af89ee77), [`a2d983e`](https://github.com/tinacms/tinacms/commit/a2d983ed886f66db2c133e902eacaa8d07e88bdb), [`bc35474`](https://github.com/tinacms/tinacms/commit/bc354740d0cb359c372ba287974e7e9db3c5119c)]:
91
+ - tinacms@2.9.2
13
92
 
14
93
  ## 2.3.5
15
94
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/app",
3
- "version": "0.0.0-572fb28-20251110050421",
3
+ "version": "0.0.0-58f6dab-20251211010953",
4
4
  "main": "src/main.tsx",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
@@ -16,7 +16,7 @@
16
16
  "@graphiql/toolkit": "0.8.4",
17
17
  "@headlessui/react": "2.1.8",
18
18
  "@heroicons/react": "^1.0.6",
19
- "@monaco-editor/react": "4.4.5",
19
+ "@monaco-editor/react": "4.7.0-rc.0",
20
20
  "final-form": "4.20.10",
21
21
  "graphiql": "3.0.0-alpha.1",
22
22
  "graphql": "15.8.0",
@@ -26,7 +26,11 @@
26
26
  "react-router-dom": "6.3.0",
27
27
  "typescript": "^5.7.3",
28
28
  "zod": "^3.24.2",
29
- "@tinacms/mdx": "1.8.1",
30
- "tinacms": "0.0.0-572fb28-20251110050421"
29
+ "@tinacms/mdx": "2.0.1",
30
+ "tinacms": "0.0.0-58f6dab-20251211010953"
31
+ },
32
+ "repository": {
33
+ "url": "https://github.com/tinacms/tinacms.git",
34
+ "directory": "packages/@tinacms/app"
31
35
  }
32
36
  }
@@ -526,9 +526,17 @@ export const useGraphQLReducer = (
526
526
  const [queryId, eventFieldName] = event.data.fieldName.split('---');
527
527
  const result = results.find((res) => res.id === queryId);
528
528
  if (result?.data) {
529
+ const { formId, fieldName } = getFormAndFieldNameFromMetadata(
530
+ result.data,
531
+ eventFieldName
532
+ );
529
533
  cms.dispatch({
530
534
  type: 'forms:set-active-field-name',
531
- value: getFormAndFieldNameFromMetadata(result.data, eventFieldName),
535
+ value: { formId: formId, fieldName: fieldName },
536
+ });
537
+ cms.events.dispatch({
538
+ ...event.data,
539
+ type: 'field:focus',
532
540
  });
533
541
  }
534
542
  cms.dispatch({
@@ -536,6 +544,30 @@ export const useGraphQLReducer = (
536
544
  value: 'openOrFull',
537
545
  });
538
546
  }
547
+ if (event.data.type === 'field:hovered') {
548
+ if (event.data.fieldName) {
549
+ const [queryId, eventFieldName] = event.data.fieldName.split('---');
550
+ const result = results.find((res) => res.id === queryId);
551
+ if (result?.data) {
552
+ const fieldData = getFormAndFieldNameFromMetadata(
553
+ result.data,
554
+ eventFieldName
555
+ );
556
+ cms.dispatch({
557
+ type: 'forms:set-hovered-field-name',
558
+ value: fieldData,
559
+ });
560
+ }
561
+ } else {
562
+ // Clear hover state when fieldName is null
563
+ cms.forms.all().forEach((form) => {
564
+ cms.dispatch({
565
+ type: 'forms:set-hovered-field-name',
566
+ value: { formId: form.id, fieldName: null },
567
+ });
568
+ });
569
+ }
570
+ }
539
571
  if (event.data.type === 'close') {
540
572
  const payloadSchema = z.object({ id: z.string() });
541
573
  const { id } = payloadSchema.parse(event.data);
@@ -598,6 +630,33 @@ export const useGraphQLReducer = (
598
630
  });
599
631
  }, [cms.state.sidebarDisplayState]);
600
632
 
633
+ // Compute the active field name to send to iframe
634
+ const activeFieldName = React.useMemo(() => {
635
+ const activeForm = cms.state.forms.find(
636
+ (form: any) => form.tinaForm.id === cms.state.activeFormId
637
+ );
638
+ if (!activeForm) {
639
+ return null;
640
+ }
641
+ const fieldName = activeForm.activeFieldName;
642
+ if (fieldName === null) {
643
+ return null;
644
+ }
645
+ const queries = activeForm.tinaForm.queries;
646
+ if (queries && queries.length > 0) {
647
+ const queryId = queries[queries.length - 1];
648
+ return `${queryId}---${fieldName}`;
649
+ }
650
+ return null;
651
+ }, [cms.state.forms, cms.state.activeFormId]);
652
+
653
+ React.useEffect(() => {
654
+ iframe.current?.contentWindow?.postMessage({
655
+ type: 'field:set-focused',
656
+ fieldName: activeFieldName,
657
+ });
658
+ }, [activeFieldName, iframe]);
659
+
601
660
  React.useEffect(() => {
602
661
  cms.dispatch({ type: 'set-edit-mode', value: 'visual' });
603
662
  if (iframe) {
package/src/lib/types.ts CHANGED
@@ -5,6 +5,7 @@ export type PostMessage =
5
5
  data: object;
6
6
  }
7
7
  | { type: 'field:selected'; fieldName: string }
8
+ | { type: 'field:hovered'; fieldName: string | null }
8
9
  | { type: 'quick-edit'; value: boolean }
9
10
  | { type: 'user-select-form'; formId: string }
10
11
  | { type: 'url-changed' };