tinacms 0.0.0-9e83b99-20250316235714 → 0.0.0-a1ff961-20250623024558
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/README.md +1 -1
- package/dist/admin/components/GetCollection.d.ts +2 -2
- package/dist/admin/components/Page.d.ts +3 -9
- package/dist/admin/components/Sidebar.d.ts +0 -3
- package/dist/admin/components/ui/tooltip.d.ts +7 -0
- package/dist/admin/pages/CollectionCreatePage.d.ts +1 -1
- package/dist/admin/pages/CollectionListPage.d.ts +2 -2
- package/dist/admin/pages/DashboardPage.d.ts +0 -3
- package/dist/admin/pages/ScreenPage.d.ts +0 -3
- package/dist/client.js +10 -1
- package/dist/client.mjs +10 -1
- package/dist/index.js +100600 -13906
- package/dist/index.mjs +100656 -13962
- package/dist/internalClient/index.d.ts +3 -3
- package/dist/react.d.ts +13 -6
- package/dist/react.js +61 -52
- package/dist/react.mjs +61 -52
- package/dist/rich-text/index.js +10 -4
- package/dist/rich-text/index.mjs +10 -4
- package/dist/rich-text/prism.js +1 -1
- package/dist/rich-text/prism.mjs +1 -1
- package/dist/toolkit/components/media/media-item.d.ts +1 -1
- package/dist/toolkit/components/media/media-manager.d.ts +1 -1
- package/dist/toolkit/components/ui/breadcrumb.d.ts +11 -0
- package/dist/toolkit/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/toolkit/fields/components/password-field.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/components/button.d.ts +2 -2
- package/dist/toolkit/fields/components/reference/components/command.d.ts +21 -33
- package/dist/toolkit/fields/components/reference/components/popover.d.ts +1 -1
- package/dist/toolkit/fields/components/reference/model/reference-link-props.d.ts +2 -0
- package/dist/toolkit/fields/components/select.d.ts +2 -2
- package/dist/toolkit/fields/components/text-field.d.ts +1 -1
- package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
- package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/index.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/editor.d.ts +20 -18
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/blockquote-element.d.ts +14 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/button.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/code-block-element.d.ts +17 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block/error-message.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-combobox.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-leaf.d.ts +2 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-line-element.d.ts +14 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-syntax-leaf.d.ts +2 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/command.d.ts +112 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dialog.d.ts +12 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/dropdown-menu.d.ts +10 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/floating-toolbar.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-element.d.ts +3 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/hr-toolbar-button.d.ts +18 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/icons.d.ts +2 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/image-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/indent-list-toolbar-button.d.ts +6 -19
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/inline-combobox.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/input.d.ts +3 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-element.d.ts +4 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-floating-toolbar.d.ts +4 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/link-toolbar-button.d.ts +4 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/list-element.d.ts +28 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-element.d.ts +3 -10
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/mermaid-toolbar-button.d.ts +6 -8
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/paragraph-element.d.ts +15 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/popover.d.ts +7 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/quote-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/raw-markdown-toolbar-button.d.ts +6 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/resizable.d.ts +24 -21
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/separator.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/slash-input-element.d.ts +15 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/block-selection.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-cell-element.d.ts +33 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/{table-dropdown-menu.d.ts → table/table-dropdown-menu.d.ts} +1 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-element.d.ts +20 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table/table-row-element.d.ts +15 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/toolbar.d.ts +7 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-hook.d.ts +10 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/use-floating-toolbar-state.d.ts +22 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/hooks/use-create-editor.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-block.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-lists.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-marks.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/autoformat/autoformat-utils.d.ts +3 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/common.d.ts +11 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/formatting.d.ts +18 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/index.d.ts +0 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-html-block/index.d.ts +6 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-img-plugin/index.d.ts +2 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-invalid-markdown-plugin/index.d.ts +5 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/component.d.ts +7 -4
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-mdx-plugins/index.d.ts +3 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/editor-plugins.d.ts +520 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/components.d.ts +262 -207
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/floating-toolbar-plugin.d.ts +1 -0
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/toolbar/toolbar-overrides.d.ts +1 -1
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/is-url.d.ts +1 -2
- package/dist/toolkit/form-builder/fields-builder.d.ts +1 -1
- package/dist/toolkit/form-builder/form-builder.d.ts +15 -5
- package/dist/toolkit/forms/field.d.ts +3 -0
- package/dist/toolkit/forms/form.d.ts +22 -3
- package/dist/toolkit/git-client/git-client.d.ts +25 -2
- package/dist/toolkit/git-client/git-file.d.ts +18 -0
- package/dist/toolkit/git-client/git-media-store.d.ts +13 -0
- package/dist/toolkit/git-client/use-git-file.d.ts +4 -0
- package/dist/toolkit/icons/Tina.d.ts +0 -5
- package/dist/toolkit/index.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +1 -0
- package/dist/toolkit/plugin-branch-switcher/branch-switcher-legacy.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-switcher.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
- package/dist/toolkit/react-cloud-config/cloud-config-plugin.d.ts +3 -3
- package/dist/toolkit/react-sidebar/components/alert.d.ts +5 -0
- package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/nav.d.ts +5 -3
- package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +7 -10
- package/dist/toolkit/react-sidebar/components/sidebar-loading-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar-no-forms-placeholder.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/sidebar.d.ts +0 -7
- package/dist/toolkit/react-sidebar/components/sync-status.d.ts +5 -8
- package/dist/toolkit/react-sidebar/index.d.ts +1 -1
- package/dist/toolkit/react-sidebar/sidebar.d.ts +2 -2
- package/dist/toolkit/styles/button.d.ts +2 -2
- package/dist/toolkit/tina-cms.d.ts +3 -3
- package/dist/toolkit/tina-state.d.ts +15 -0
- package/dist/unifiedClient/index.d.ts +1 -1
- package/dist/utils/cn.d.ts +2 -0
- package/package.json +34 -27
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/code-block-element.d.ts +0 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-cell-element.d.ts +0 -27
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-element.d.ts +0 -14
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/components/plate-ui/table-row-element.d.ts +0 -13
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/core/with-correct-void-behavior.d.ts +0 -8
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-code-block/index.d.ts +0 -3
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/create-link-plugin/index.d.ts +0 -15
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/custom/mermaid-plugin.d.ts +0 -2
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/create-soft-break-plugin.d.ts +0 -7
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/index.d.ts +0 -6
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/on-key-down-soft-break.d.ts +0 -5
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/soft-break/types.d.ts +0 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/plugins/ui/code-block/index.d.ts +0 -11
- package/dist/toolkit/fields/plugins/mdx-field-plugin/plate/transforms/insert-empty-block.d.ts +0 -2
- package/dist/toolkit/plugin-branch-switcher/branch-banner.d.ts +0 -2
- package/dist/toolkit/react-sidebar/components/no-forms-placeholder.d.ts +0 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TokenObject } from '../auth/authenticate';
|
|
2
1
|
import { BranchData, EventBus } from '@tinacms/toolkit';
|
|
3
2
|
import { DocumentNode, GraphQLSchema } from 'graphql';
|
|
3
|
+
import { TokenObject } from '../auth/authenticate';
|
|
4
|
+
import { AuthProvider, Schema, TinaSchema } from '@tinacms/schema-tools';
|
|
5
|
+
import { SearchClient } from '@tinacms/search/dist/index-client';
|
|
4
6
|
import gql from 'graphql-tag';
|
|
5
|
-
import { TinaSchema, Schema, AuthProvider } from '@tinacms/schema-tools';
|
|
6
7
|
import { TinaCloudProject } from './types';
|
|
7
|
-
import { SearchClient } from '@tinacms/search/dist/index-client';
|
|
8
8
|
export * from './authProvider';
|
|
9
9
|
export type OnLoginFunc = (args: {
|
|
10
10
|
token?: TokenObject;
|
package/dist/react.d.ts
CHANGED
|
@@ -15,16 +15,23 @@ export declare function useEditState(): {
|
|
|
15
15
|
* to signal to Tina which DOM element the field
|
|
16
16
|
* is working with.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Generate a field identifier for Tina to associate DOM elements with form fields.
|
|
20
|
+
* Format: "queryId---path.to.field" or "queryId---path.to.array.index"
|
|
21
|
+
*/
|
|
22
|
+
export declare const tinaField: <T extends {
|
|
19
23
|
_content_source?: {
|
|
20
24
|
queryId: string;
|
|
21
25
|
path: (number | string)[];
|
|
22
26
|
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
} | Record<string, unknown> | null | undefined>(object: T, property?: keyof Omit<NonNullable<T>, "__typename" | "_sys">, index?: number) => string;
|
|
28
|
+
/**
|
|
29
|
+
* FIX: This function is updated to be more robust. It explicitly checks for
|
|
30
|
+
* `null` and `String` objects to prevent them from being processed as
|
|
31
|
+
* iterable objects, which is the root cause of the "Objects are not valid
|
|
32
|
+
* as a React child" error.
|
|
33
|
+
*/
|
|
34
|
+
export declare const addMetadata: <T extends object>(id: string, obj: T, path?: (string | number)[]) => T;
|
|
28
35
|
/**
|
|
29
36
|
* This is a pretty rudimentary approach to hashing the query and variables to
|
|
30
37
|
* ensure we treat multiple queries on the page uniquely. It's possible
|
package/dist/react.js
CHANGED
|
@@ -11,14 +11,21 @@
|
|
|
11
11
|
() => hashFromQuery(stringifiedQuery),
|
|
12
12
|
[stringifiedQuery]
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const processedData = React.useMemo(() => {
|
|
15
|
+
const dataCopy = JSON.parse(JSON.stringify(props.data));
|
|
16
|
+
return addMetadata(id, dataCopy, []);
|
|
17
|
+
}, [props.data, id]);
|
|
18
|
+
const [data, setData] = React.useState(processedData);
|
|
15
19
|
const [isClient, setIsClient] = React.useState(false);
|
|
16
20
|
const [quickEditEnabled, setQuickEditEnabled] = React.useState(false);
|
|
17
21
|
const [isInTinaIframe, setIsInTinaIframe] = React.useState(false);
|
|
18
22
|
React.useEffect(() => {
|
|
19
23
|
setIsClient(true);
|
|
20
|
-
setData(
|
|
21
|
-
|
|
24
|
+
setData(processedData);
|
|
25
|
+
parent.postMessage({
|
|
26
|
+
type: "url-changed"
|
|
27
|
+
});
|
|
28
|
+
}, [id, processedData]);
|
|
22
29
|
React.useEffect(() => {
|
|
23
30
|
if (quickEditEnabled) {
|
|
24
31
|
let mouseDownHandler = function(e) {
|
|
@@ -110,12 +117,18 @@
|
|
|
110
117
|
React.useEffect(() => {
|
|
111
118
|
const { experimental___selectFormByFormId, ...rest } = props;
|
|
112
119
|
parent.postMessage({ type: "open", ...rest, id }, window.location.origin);
|
|
113
|
-
|
|
120
|
+
const handleMessage = (event) => {
|
|
114
121
|
if (event.data.type === "quickEditEnabled") {
|
|
115
122
|
setQuickEditEnabled(event.data.value);
|
|
116
123
|
}
|
|
117
124
|
if (event.data.id === id && event.data.type === "updateData") {
|
|
118
|
-
|
|
125
|
+
const rawData = event.data.data;
|
|
126
|
+
const newlyProcessedData = addMetadata(
|
|
127
|
+
id,
|
|
128
|
+
JSON.parse(JSON.stringify(rawData)),
|
|
129
|
+
[]
|
|
130
|
+
);
|
|
131
|
+
setData(newlyProcessedData);
|
|
119
132
|
setIsInTinaIframe(true);
|
|
120
133
|
const anyTinaField = document.querySelector("[data-tina-field]");
|
|
121
134
|
if (anyTinaField) {
|
|
@@ -130,8 +143,10 @@
|
|
|
130
143
|
);
|
|
131
144
|
}
|
|
132
145
|
}
|
|
133
|
-
}
|
|
146
|
+
};
|
|
147
|
+
window.addEventListener("message", handleMessage);
|
|
134
148
|
return () => {
|
|
149
|
+
window.removeEventListener("message", handleMessage);
|
|
135
150
|
parent.postMessage({ type: "close", id }, window.location.origin);
|
|
136
151
|
};
|
|
137
152
|
}, [id, setQuickEditEnabled]);
|
|
@@ -153,59 +168,53 @@
|
|
|
153
168
|
return { edit };
|
|
154
169
|
}
|
|
155
170
|
const tinaField = (object, property, index) => {
|
|
156
|
-
|
|
157
|
-
if (!
|
|
171
|
+
const contentSource = object == null ? void 0 : object._content_source;
|
|
172
|
+
if (!contentSource) {
|
|
158
173
|
return "";
|
|
159
174
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
(_a = object._content_source) == null ? void 0 : _a.queryId,
|
|
164
|
-
object._content_source.path.join(".")
|
|
165
|
-
].join("---");
|
|
166
|
-
}
|
|
167
|
-
if (typeof index === "number") {
|
|
168
|
-
return [
|
|
169
|
-
(_b = object._content_source) == null ? void 0 : _b.queryId,
|
|
170
|
-
[...object._content_source.path, property, index].join(".")
|
|
171
|
-
].join("---");
|
|
172
|
-
}
|
|
173
|
-
return [
|
|
174
|
-
(_c = object._content_source) == null ? void 0 : _c.queryId,
|
|
175
|
-
[...object._content_source.path, property].join(".")
|
|
176
|
-
].join("---");
|
|
175
|
+
const { queryId, path } = contentSource;
|
|
176
|
+
if (!property) {
|
|
177
|
+
return `${queryId}---${path.join(".")}`;
|
|
177
178
|
}
|
|
178
|
-
|
|
179
|
+
const fullPath = typeof index === "number" ? [...path, property, index] : [...path, property];
|
|
180
|
+
return `${queryId}---${fullPath.join(".")}`;
|
|
179
181
|
};
|
|
180
|
-
const addMetadata = (id,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
182
|
+
const addMetadata = (id, obj, path = []) => {
|
|
183
|
+
if (obj === null) {
|
|
184
|
+
return obj;
|
|
185
|
+
}
|
|
186
|
+
if (isScalarOrUndefined(obj)) {
|
|
187
|
+
return obj;
|
|
188
|
+
}
|
|
189
|
+
if (obj instanceof String) {
|
|
190
|
+
return obj.valueOf();
|
|
191
|
+
}
|
|
192
|
+
if (Array.isArray(obj)) {
|
|
193
|
+
return obj.map(
|
|
194
|
+
(item, index) => addMetadata(id, item, [...path, index])
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
const transformedObj = {};
|
|
198
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
199
|
+
const currentPath = [...path, key];
|
|
200
|
+
if ([
|
|
201
|
+
"__typename",
|
|
202
|
+
"_sys",
|
|
203
|
+
"_internalSys",
|
|
204
|
+
"_values",
|
|
205
|
+
"_internalValues",
|
|
206
|
+
"_content_source",
|
|
207
|
+
"_tina_metadata"
|
|
208
|
+
].includes(key)) {
|
|
209
|
+
transformedObj[key] = value;
|
|
193
210
|
} else {
|
|
194
|
-
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
const itemObject = value;
|
|
198
|
-
addMetadata(id, itemObject, [...path, key]);
|
|
211
|
+
transformedObj[key] = addMetadata(id, value, currentPath);
|
|
199
212
|
}
|
|
200
|
-
});
|
|
201
|
-
if ((object == null ? void 0 : object.type) === "root") {
|
|
202
|
-
return;
|
|
203
213
|
}
|
|
204
|
-
object.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
};
|
|
208
|
-
return object;
|
|
214
|
+
if (transformedObj && typeof transformedObj === "object" && "type" in transformedObj && transformedObj.type === "root") {
|
|
215
|
+
return transformedObj;
|
|
216
|
+
}
|
|
217
|
+
return { ...transformedObj, _content_source: { queryId: id, path } };
|
|
209
218
|
};
|
|
210
219
|
function isScalarOrUndefined(value) {
|
|
211
220
|
const type = typeof value;
|
package/dist/react.mjs
CHANGED
|
@@ -8,14 +8,21 @@ function useTina(props) {
|
|
|
8
8
|
() => hashFromQuery(stringifiedQuery),
|
|
9
9
|
[stringifiedQuery]
|
|
10
10
|
);
|
|
11
|
-
const
|
|
11
|
+
const processedData = React.useMemo(() => {
|
|
12
|
+
const dataCopy = JSON.parse(JSON.stringify(props.data));
|
|
13
|
+
return addMetadata(id, dataCopy, []);
|
|
14
|
+
}, [props.data, id]);
|
|
15
|
+
const [data, setData] = React.useState(processedData);
|
|
12
16
|
const [isClient, setIsClient] = React.useState(false);
|
|
13
17
|
const [quickEditEnabled, setQuickEditEnabled] = React.useState(false);
|
|
14
18
|
const [isInTinaIframe, setIsInTinaIframe] = React.useState(false);
|
|
15
19
|
React.useEffect(() => {
|
|
16
20
|
setIsClient(true);
|
|
17
|
-
setData(
|
|
18
|
-
|
|
21
|
+
setData(processedData);
|
|
22
|
+
parent.postMessage({
|
|
23
|
+
type: "url-changed"
|
|
24
|
+
});
|
|
25
|
+
}, [id, processedData]);
|
|
19
26
|
React.useEffect(() => {
|
|
20
27
|
if (quickEditEnabled) {
|
|
21
28
|
let mouseDownHandler = function(e) {
|
|
@@ -107,12 +114,18 @@ function useTina(props) {
|
|
|
107
114
|
React.useEffect(() => {
|
|
108
115
|
const { experimental___selectFormByFormId, ...rest } = props;
|
|
109
116
|
parent.postMessage({ type: "open", ...rest, id }, window.location.origin);
|
|
110
|
-
|
|
117
|
+
const handleMessage = (event) => {
|
|
111
118
|
if (event.data.type === "quickEditEnabled") {
|
|
112
119
|
setQuickEditEnabled(event.data.value);
|
|
113
120
|
}
|
|
114
121
|
if (event.data.id === id && event.data.type === "updateData") {
|
|
115
|
-
|
|
122
|
+
const rawData = event.data.data;
|
|
123
|
+
const newlyProcessedData = addMetadata(
|
|
124
|
+
id,
|
|
125
|
+
JSON.parse(JSON.stringify(rawData)),
|
|
126
|
+
[]
|
|
127
|
+
);
|
|
128
|
+
setData(newlyProcessedData);
|
|
116
129
|
setIsInTinaIframe(true);
|
|
117
130
|
const anyTinaField = document.querySelector("[data-tina-field]");
|
|
118
131
|
if (anyTinaField) {
|
|
@@ -127,8 +140,10 @@ function useTina(props) {
|
|
|
127
140
|
);
|
|
128
141
|
}
|
|
129
142
|
}
|
|
130
|
-
}
|
|
143
|
+
};
|
|
144
|
+
window.addEventListener("message", handleMessage);
|
|
131
145
|
return () => {
|
|
146
|
+
window.removeEventListener("message", handleMessage);
|
|
132
147
|
parent.postMessage({ type: "close", id }, window.location.origin);
|
|
133
148
|
};
|
|
134
149
|
}, [id, setQuickEditEnabled]);
|
|
@@ -150,59 +165,53 @@ function useEditState() {
|
|
|
150
165
|
return { edit };
|
|
151
166
|
}
|
|
152
167
|
const tinaField = (object, property, index) => {
|
|
153
|
-
|
|
154
|
-
if (!
|
|
168
|
+
const contentSource = object == null ? void 0 : object._content_source;
|
|
169
|
+
if (!contentSource) {
|
|
155
170
|
return "";
|
|
156
171
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
(_a = object._content_source) == null ? void 0 : _a.queryId,
|
|
161
|
-
object._content_source.path.join(".")
|
|
162
|
-
].join("---");
|
|
163
|
-
}
|
|
164
|
-
if (typeof index === "number") {
|
|
165
|
-
return [
|
|
166
|
-
(_b = object._content_source) == null ? void 0 : _b.queryId,
|
|
167
|
-
[...object._content_source.path, property, index].join(".")
|
|
168
|
-
].join("---");
|
|
169
|
-
}
|
|
170
|
-
return [
|
|
171
|
-
(_c = object._content_source) == null ? void 0 : _c.queryId,
|
|
172
|
-
[...object._content_source.path, property].join(".")
|
|
173
|
-
].join("---");
|
|
172
|
+
const { queryId, path } = contentSource;
|
|
173
|
+
if (!property) {
|
|
174
|
+
return `${queryId}---${path.join(".")}`;
|
|
174
175
|
}
|
|
175
|
-
|
|
176
|
+
const fullPath = typeof index === "number" ? [...path, property, index] : [...path, property];
|
|
177
|
+
return `${queryId}---${fullPath.join(".")}`;
|
|
176
178
|
};
|
|
177
|
-
const addMetadata = (id,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
179
|
+
const addMetadata = (id, obj, path = []) => {
|
|
180
|
+
if (obj === null) {
|
|
181
|
+
return obj;
|
|
182
|
+
}
|
|
183
|
+
if (isScalarOrUndefined(obj)) {
|
|
184
|
+
return obj;
|
|
185
|
+
}
|
|
186
|
+
if (obj instanceof String) {
|
|
187
|
+
return obj.valueOf();
|
|
188
|
+
}
|
|
189
|
+
if (Array.isArray(obj)) {
|
|
190
|
+
return obj.map(
|
|
191
|
+
(item, index) => addMetadata(id, item, [...path, index])
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
const transformedObj = {};
|
|
195
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
196
|
+
const currentPath = [...path, key];
|
|
197
|
+
if ([
|
|
198
|
+
"__typename",
|
|
199
|
+
"_sys",
|
|
200
|
+
"_internalSys",
|
|
201
|
+
"_values",
|
|
202
|
+
"_internalValues",
|
|
203
|
+
"_content_source",
|
|
204
|
+
"_tina_metadata"
|
|
205
|
+
].includes(key)) {
|
|
206
|
+
transformedObj[key] = value;
|
|
190
207
|
} else {
|
|
191
|
-
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
const itemObject = value;
|
|
195
|
-
addMetadata(id, itemObject, [...path, key]);
|
|
208
|
+
transformedObj[key] = addMetadata(id, value, currentPath);
|
|
196
209
|
}
|
|
197
|
-
});
|
|
198
|
-
if ((object == null ? void 0 : object.type) === "root") {
|
|
199
|
-
return;
|
|
200
210
|
}
|
|
201
|
-
object.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
};
|
|
205
|
-
return object;
|
|
211
|
+
if (transformedObj && typeof transformedObj === "object" && "type" in transformedObj && transformedObj.type === "root") {
|
|
212
|
+
return transformedObj;
|
|
213
|
+
}
|
|
214
|
+
return { ...transformedObj, _content_source: { queryId: id, path } };
|
|
206
215
|
};
|
|
207
216
|
function isScalarOrUndefined(value) {
|
|
208
217
|
const type = typeof value;
|
package/dist/rich-text/index.js
CHANGED
|
@@ -117,17 +117,23 @@
|
|
|
117
117
|
// @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
|
|
118
118
|
/* @__PURE__ */ React.createElement("a", { href: child.url }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }))
|
|
119
119
|
);
|
|
120
|
-
case "mermaid":
|
|
121
120
|
case "code_block": {
|
|
122
|
-
|
|
121
|
+
let codeString = "";
|
|
122
|
+
if (Array.isArray(child.children)) {
|
|
123
|
+
codeString = child.children.map(
|
|
124
|
+
(line) => Array.isArray(line.children) ? line.children.map((t) => t.text).join("") : ""
|
|
125
|
+
).join("\n");
|
|
126
|
+
} else if (typeof child.value === "string") {
|
|
127
|
+
codeString = child.value;
|
|
128
|
+
}
|
|
123
129
|
if (components[child.type]) {
|
|
124
130
|
const Component2 = components[child.type];
|
|
125
131
|
return (
|
|
126
132
|
// @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
|
|
127
|
-
/* @__PURE__ */ React.createElement(Component2, { ...props })
|
|
133
|
+
/* @__PURE__ */ React.createElement(Component2, { ...props, value: codeString })
|
|
128
134
|
);
|
|
129
135
|
}
|
|
130
|
-
return /* @__PURE__ */ React.createElement("pre", null, /* @__PURE__ */ React.createElement("code", null,
|
|
136
|
+
return /* @__PURE__ */ React.createElement("pre", null, /* @__PURE__ */ React.createElement("code", null, codeString));
|
|
131
137
|
}
|
|
132
138
|
case "hr":
|
|
133
139
|
if (components[child.type]) {
|
package/dist/rich-text/index.mjs
CHANGED
|
@@ -114,17 +114,23 @@ const Node = ({ components, child }) => {
|
|
|
114
114
|
// @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
|
|
115
115
|
/* @__PURE__ */ React.createElement("a", { href: child.url }, /* @__PURE__ */ React.createElement(TinaMarkdown, { components, content: children }))
|
|
116
116
|
);
|
|
117
|
-
case "mermaid":
|
|
118
117
|
case "code_block": {
|
|
119
|
-
|
|
118
|
+
let codeString = "";
|
|
119
|
+
if (Array.isArray(child.children)) {
|
|
120
|
+
codeString = child.children.map(
|
|
121
|
+
(line) => Array.isArray(line.children) ? line.children.map((t) => t.text).join("") : ""
|
|
122
|
+
).join("\n");
|
|
123
|
+
} else if (typeof child.value === "string") {
|
|
124
|
+
codeString = child.value;
|
|
125
|
+
}
|
|
120
126
|
if (components[child.type]) {
|
|
121
127
|
const Component2 = components[child.type];
|
|
122
128
|
return (
|
|
123
129
|
// @ts-ignore FIXME: TinaMarkdownContent needs to be a union of all possible node types
|
|
124
|
-
/* @__PURE__ */ React.createElement(Component2, { ...props })
|
|
130
|
+
/* @__PURE__ */ React.createElement(Component2, { ...props, value: codeString })
|
|
125
131
|
);
|
|
126
132
|
}
|
|
127
|
-
return /* @__PURE__ */ React.createElement("pre", null, /* @__PURE__ */ React.createElement("code", null,
|
|
133
|
+
return /* @__PURE__ */ React.createElement("pre", null, /* @__PURE__ */ React.createElement("code", null, codeString));
|
|
128
134
|
}
|
|
129
135
|
case "hr":
|
|
130
136
|
if (components[child.type]) {
|
package/dist/rich-text/prism.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
prismReactRenderer.Highlight,
|
|
8
8
|
{
|
|
9
9
|
theme: prismReactRenderer.themes[props.theme || "github"],
|
|
10
|
-
code: props.value,
|
|
10
|
+
code: props.value || "",
|
|
11
11
|
language: props.lang || ""
|
|
12
12
|
},
|
|
13
13
|
({ className, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React.createElement("pre", { className, style }, tokens.map((line, i) => /* @__PURE__ */ React.createElement("div", { ...getLineProps({ line, key: i }) }, line.map((token, key) => /* @__PURE__ */ React.createElement("span", { ...getTokenProps({ token, key }) })))))
|
package/dist/rich-text/prism.mjs
CHANGED
|
@@ -5,7 +5,7 @@ const Prism = (props) => {
|
|
|
5
5
|
Highlight,
|
|
6
6
|
{
|
|
7
7
|
theme: themes[props.theme || "github"],
|
|
8
|
-
code: props.value,
|
|
8
|
+
code: props.value || "",
|
|
9
9
|
language: props.lang || ""
|
|
10
10
|
},
|
|
11
11
|
({ className, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React.createElement("pre", { className, style }, tokens.map((line, i) => /* @__PURE__ */ React.createElement("div", { ...getLineProps({ line, key: i }) }, line.map((token, key) => /* @__PURE__ */ React.createElement("span", { ...getTokenProps({ token, key }) })))))
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>): React.JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
5
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<'a'> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
11
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: 'default' | 'destructive';
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): React.JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
|
|
14
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): React.JSX.Element;
|
|
15
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
|
|
19
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
20
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
|
|
21
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
|
|
25
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -4,6 +4,6 @@ export interface PasswordFieldProps extends a {
|
|
|
4
4
|
error?: boolean;
|
|
5
5
|
ref?: any;
|
|
6
6
|
}
|
|
7
|
-
export declare const passwordFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded
|
|
7
|
+
export declare const passwordFieldClasses = "shadow-inner focus:shadow-outline focus:border-blue-500 focus:outline-none block text-base placeholder:text-gray-300 px-3 py-2 text-gray-600 w-full bg-white border border-gray-200 transition-all ease-out duration-150 focus:text-gray-900 rounded";
|
|
8
8
|
export declare const BasePasswordField: React.ForwardRefExoticComponent<Omit<PasswordFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: {
|
|
4
4
|
variant?: "outline";
|
|
5
5
|
size?: "default" | "icon" | "sm" | "lg";
|
|
6
|
-
} & import("class-variance-authority/
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}
|
|
@@ -1,67 +1,55 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
3
3
|
children?: React.ReactNode;
|
|
4
|
-
} &
|
|
5
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
6
|
-
} & {
|
|
4
|
+
} & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
7
5
|
asChild?: boolean;
|
|
8
|
-
}, "
|
|
6
|
+
}, "ref"> & {
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
disablePointerSelection?: boolean;
|
|
9
9
|
label?: string;
|
|
10
|
+
loop?: boolean;
|
|
10
11
|
shouldFilter?: boolean;
|
|
11
|
-
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
12
|
-
defaultValue?: string;
|
|
13
12
|
value?: string;
|
|
14
|
-
onValueChange?: (value: string) => void;
|
|
15
|
-
loop?: boolean;
|
|
16
|
-
disablePointerSelection?: boolean;
|
|
17
13
|
vimBindings?: boolean;
|
|
14
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
18
16
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<
|
|
20
|
-
ref?: React.Ref<HTMLInputElement>;
|
|
21
|
-
} & {
|
|
17
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.ClassAttributes<HTMLInputElement> & React.InputHTMLAttributes<HTMLInputElement> & {
|
|
22
18
|
asChild?: boolean;
|
|
23
|
-
}, "
|
|
19
|
+
}, "ref">, "value" | "type" | "onChange"> & {
|
|
24
20
|
value?: string;
|
|
25
21
|
onValueChange?: (search: string) => void;
|
|
26
22
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
27
23
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
28
24
|
children?: React.ReactNode;
|
|
29
|
-
} &
|
|
30
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
31
|
-
} & {
|
|
25
|
+
} & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
32
26
|
asChild?: boolean;
|
|
33
|
-
}, "
|
|
27
|
+
}, "ref"> & {
|
|
34
28
|
label?: string;
|
|
35
29
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
30
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
37
31
|
children?: React.ReactNode;
|
|
38
|
-
} &
|
|
39
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
40
|
-
} & {
|
|
32
|
+
} & Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
41
33
|
asChild?: boolean;
|
|
42
|
-
}, "
|
|
34
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
43
35
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
44
36
|
children?: React.ReactNode;
|
|
45
|
-
} & Omit<
|
|
46
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
47
|
-
} & {
|
|
37
|
+
} & Omit<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
48
38
|
asChild?: boolean;
|
|
49
|
-
}, "
|
|
39
|
+
}, "ref">, "value" | "heading"> & {
|
|
40
|
+
forceMount?: boolean;
|
|
50
41
|
heading?: React.ReactNode;
|
|
51
42
|
value?: string;
|
|
52
|
-
forceMount?: boolean;
|
|
53
43
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
54
44
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
55
45
|
children?: React.ReactNode;
|
|
56
|
-
} & Omit<
|
|
57
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
-
} & {
|
|
46
|
+
} & Omit<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
59
47
|
asChild?: boolean;
|
|
60
|
-
}, "
|
|
48
|
+
}, "ref">, "value" | "disabled" | "onSelect"> & {
|
|
61
49
|
disabled?: boolean;
|
|
62
|
-
onSelect?: (value: string) => void;
|
|
63
|
-
value?: string;
|
|
64
|
-
keywords?: string[];
|
|
65
50
|
forceMount?: boolean;
|
|
51
|
+
keywords?: string[];
|
|
52
|
+
value?: string;
|
|
53
|
+
onSelect?: (value: string) => void;
|
|
66
54
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
67
55
|
export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
4
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { Field } from '../../forms';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
type Option = {
|
|
4
4
|
value: string;
|
|
5
5
|
label: string;
|
|
@@ -18,6 +18,6 @@ export interface SelectProps {
|
|
|
18
18
|
options?: (Option | string)[];
|
|
19
19
|
className?: string;
|
|
20
20
|
}
|
|
21
|
-
export declare const selectFieldClasses = "shadow appearance-none bg-white block pl-3 pr-8 py-2 truncate w-full text-base cursor-pointer border border-gray-200 focus:outline-none focus:shadow-outline focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded
|
|
21
|
+
export declare const selectFieldClasses = "shadow appearance-none bg-white block pl-3 pr-8 py-2 truncate w-full text-base cursor-pointer border border-gray-200 focus:outline-none focus:shadow-outline focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded";
|
|
22
22
|
export declare const Select: React.FC<SelectProps>;
|
|
23
23
|
export {};
|