tinacms 0.0.0-984566a-20250219181559 → 0.0.0-99bb59f-20250220002800

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/dist/react.d.ts CHANGED
@@ -2,6 +2,7 @@ export declare function useTina<T extends object>(props: {
2
2
  query: string;
3
3
  variables: object;
4
4
  data: T;
5
+ experimental___selectFormByFormId?: () => string | false | undefined;
5
6
  }): {
6
7
  data: T;
7
8
  isClient: boolean;
package/dist/react.js CHANGED
@@ -100,7 +100,16 @@
100
100
  }
101
101
  }, [quickEditEnabled, isInTinaIframe]);
102
102
  React.useEffect(() => {
103
- parent.postMessage({ type: "open", ...props, id }, window.location.origin);
103
+ if (props == null ? void 0 : props.experimental___selectFormByFormId) {
104
+ parent.postMessage({
105
+ type: "user-select-form",
106
+ formId: props.experimental___selectFormByFormId()
107
+ });
108
+ }
109
+ }, [id]);
110
+ React.useEffect(() => {
111
+ const { experimental___selectFormByFormId, ...rest } = props;
112
+ parent.postMessage({ type: "open", ...rest, id }, window.location.origin);
104
113
  window.addEventListener("message", (event) => {
105
114
  if (event.data.type === "quickEditEnabled") {
106
115
  setQuickEditEnabled(event.data.value);
package/dist/react.mjs CHANGED
@@ -97,7 +97,16 @@ function useTina(props) {
97
97
  }
98
98
  }, [quickEditEnabled, isInTinaIframe]);
99
99
  React.useEffect(() => {
100
- parent.postMessage({ type: "open", ...props, id }, window.location.origin);
100
+ if (props == null ? void 0 : props.experimental___selectFormByFormId) {
101
+ parent.postMessage({
102
+ type: "user-select-form",
103
+ formId: props.experimental___selectFormByFormId()
104
+ });
105
+ }
106
+ }, [id]);
107
+ React.useEffect(() => {
108
+ const { experimental___selectFormByFormId, ...rest } = props;
109
+ parent.postMessage({ type: "open", ...rest, id }, window.location.origin);
101
110
  window.addEventListener("message", (event) => {
102
111
  if (event.data.type === "quickEditEnabled") {
103
112
  setQuickEditEnabled(event.data.value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.0.0-984566a-20250219181559",
3
+ "version": "0.0.0-99bb59f-20250220002800",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -129,9 +129,9 @@
129
129
  "webfontloader": "1.6.28",
130
130
  "yup": "^1.6.1",
131
131
  "zod": "^3.24.2",
132
- "@tinacms/mdx": "0.0.0-984566a-20250219181559",
133
- "@tinacms/schema-tools": "0.0.0-984566a-20250219181559",
134
- "@tinacms/search": "0.0.0-984566a-20250219181559"
132
+ "@tinacms/mdx": "0.0.0-99bb59f-20250220002800",
133
+ "@tinacms/schema-tools": "0.0.0-99bb59f-20250220002800",
134
+ "@tinacms/search": "0.0.0-99bb59f-20250220002800"
135
135
  },
136
136
  "devDependencies": {
137
137
  "@graphql-tools/utils": "^10.8.1",
@@ -164,7 +164,7 @@
164
164
  "typescript": "^5.7.3",
165
165
  "vite": "^5.4.14",
166
166
  "vitest": "^2.1.9",
167
- "@tinacms/scripts": "0.0.0-984566a-20250219181559"
167
+ "@tinacms/scripts": "0.0.0-99bb59f-20250220002800"
168
168
  },
169
169
  "peerDependencies": {
170
170
  "react": ">=16.14.0",