tinacms 0.0.0-c6915ea-20250421012527 → 0.0.0-c706b9f-20251222081038
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/admin/api.d.ts +4 -1
- package/dist/admin/components/{Sidebar.d.ts → AdminNav.d.ts} +0 -3
- package/dist/admin/components/Page.d.ts +3 -9
- 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/auth/AuthModal.d.ts +1 -4
- package/dist/auth/TinaCloudProvider.d.ts +0 -1
- package/dist/auth/authenticate.d.ts +1 -1
- package/dist/cache/node-cache.d.ts +6 -2
- package/dist/client.d.ts +4 -1
- package/dist/client.js +240 -181
- package/dist/index.d.ts +61 -1
- package/dist/index.js +122387 -33769
- package/dist/internalClient/authProvider.d.ts +0 -2
- package/dist/internalClient/index.d.ts +48 -30
- package/dist/react.d.ts +41 -1
- package/dist/react.js +295 -196
- package/dist/rich-text/index.d.ts +148 -1
- package/dist/rich-text/index.js +234 -224
- package/dist/rich-text/prism.d.ts +10 -1
- package/dist/rich-text/prism.js +16 -18
- package/dist/rich-text/static.d.ts +154 -0
- package/dist/rich-text/{index.mjs → static.js} +99 -99
- package/dist/tina-cms.d.ts +1 -1
- package/dist/toolkit/components/ProgressBar.d.ts +11 -0
- package/dist/toolkit/components/active-field-indicator.d.ts +1 -0
- package/dist/toolkit/components/media/media-item.d.ts +11 -1
- package/dist/toolkit/components/ui/breadcrumb.d.ts +11 -0
- package/dist/toolkit/components/ui/button.d.ts +11 -0
- package/dist/toolkit/components/ui/calendar.d.ts +8 -0
- package/dist/toolkit/components/ui/date-time-picker.d.ts +111 -0
- package/dist/toolkit/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/toolkit/components/ui/input.d.ts +3 -0
- package/dist/toolkit/components/ui/popover.d.ts +7 -0
- package/dist/toolkit/components/ui/select.d.ts +13 -0
- package/dist/toolkit/fields/components/color-picker/block-widget.d.ts +3 -0
- package/dist/toolkit/fields/components/color-picker/color-input.d.ts +35 -0
- package/dist/toolkit/fields/components/color-picker/color-picker.d.ts +6 -2
- package/dist/toolkit/fields/components/color-picker/color-utils.d.ts +37 -0
- package/dist/toolkit/fields/components/color-picker/sketch-widget.d.ts +3 -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/button-toggle-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/checkbox-group-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/color-field-plugin.d.ts +1 -0
- package/dist/toolkit/fields/plugins/date-field-plugin.d.ts +0 -2
- package/dist/toolkit/fields/plugins/dnd-kit-wrapper.d.ts +49 -0
- package/dist/toolkit/fields/plugins/group-field-plugin.d.ts +1 -1
- package/dist/toolkit/fields/plugins/group-list-field-plugin.d.ts +3 -1
- package/dist/toolkit/fields/plugins/list-field-meta.d.ts +1 -1
- package/dist/toolkit/fields/plugins/list-field-plugin.d.ts +3 -0
- 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 +5 -5
- 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 +263 -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/fields/plugins/radio-group-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/select-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/toggle-field-plugin.d.ts +2 -2
- package/dist/toolkit/fields/plugins/wrap-field-with-meta.d.ts +6 -2
- package/dist/toolkit/form-builder/create-branch-modal.d.ts +13 -0
- package/dist/toolkit/form-builder/editorial-workflow-constants.d.ts +17 -0
- package/dist/toolkit/form-builder/fields-builder.d.ts +3 -2
- package/dist/toolkit/form-builder/form-builder.d.ts +9 -9
- package/dist/toolkit/form-builder/index.d.ts +1 -0
- package/dist/toolkit/forms/field.d.ts +6 -2
- 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/icons/TinaExtended.d.ts +4 -0
- package/dist/toolkit/icons/index.d.ts +1 -0
- package/dist/toolkit/index.d.ts +1 -1
- package/dist/toolkit/plugin-branch-switcher/branch-button.d.ts +4 -1
- package/dist/toolkit/plugin-branch-switcher/index.d.ts +0 -1
- package/dist/toolkit/react-modals/modal/modal-actions.d.ts +2 -1
- package/dist/toolkit/react-modals/modal/modal-header.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/NavMenuTrigger.d.ts +11 -0
- package/dist/toolkit/react-sidebar/components/VersionInfo.d.ts +2 -0
- package/dist/toolkit/react-sidebar/components/badge.d.ts +6 -0
- package/dist/toolkit/react-sidebar/components/callout.d.ts +5 -0
- package/dist/toolkit/react-sidebar/components/form-list.d.ts +1 -1
- package/dist/toolkit/react-sidebar/components/local-warning.d.ts +3 -1
- package/dist/toolkit/react-sidebar/components/nav-components.d.ts +11 -0
- package/dist/toolkit/react-sidebar/components/nav-context.d.ts +15 -0
- package/dist/toolkit/react-sidebar/components/nav.d.ts +6 -3
- package/dist/toolkit/react-sidebar/components/resize-handle.d.ts +0 -5
- package/dist/toolkit/react-sidebar/components/sidebar-body.d.ts +28 -7
- 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 +4 -1
- package/dist/toolkit/styles/button.d.ts +2 -2
- package/dist/toolkit/styles/dropdown-button.d.ts +75 -0
- package/dist/toolkit/styles/index.d.ts +1 -0
- package/dist/toolkit/tina-cms.d.ts +3 -3
- package/dist/toolkit/tina-state.d.ts +53 -16
- package/dist/unifiedClient/index.d.ts +1 -1
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +59 -83
- package/dist/admin/components/AuthCallback.d.ts +0 -5
- package/dist/admin/pages/IndexingPage.d.ts +0 -2
- package/dist/client.mjs +0 -132
- package/dist/index.mjs +0 -35202
- package/dist/node-cache-5e8db9f0.mjs +0 -63
- package/dist/react.mjs +0 -246
- package/dist/rich-text/prism.mjs +0 -16
- 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-datetime/DateTime.d.ts +0 -135
|
@@ -33,7 +33,6 @@ export declare class TinaCloudAuthProvider extends AbstractAuthProvider {
|
|
|
33
33
|
clientId: string;
|
|
34
34
|
identityApiUrl: string;
|
|
35
35
|
frontendUrl: string;
|
|
36
|
-
oauth2: boolean;
|
|
37
36
|
token: string;
|
|
38
37
|
setToken: (_token: TokenObject) => void;
|
|
39
38
|
getToken: () => Promise<TokenObject>;
|
|
@@ -43,7 +42,6 @@ export declare class TinaCloudAuthProvider extends AbstractAuthProvider {
|
|
|
43
42
|
tokenStorage?: 'MEMORY' | 'LOCAL_STORAGE' | 'CUSTOM';
|
|
44
43
|
getTokenFn?: () => Promise<TokenObject>;
|
|
45
44
|
frontendUrl: string;
|
|
46
|
-
oauth2?: boolean;
|
|
47
45
|
});
|
|
48
46
|
authenticate(): Promise<TokenObject>;
|
|
49
47
|
getUser(): Promise<any>;
|
|
@@ -2,7 +2,12 @@ import { BranchData, EventBus } from '@tinacms/toolkit';
|
|
|
2
2
|
import { DocumentNode, GraphQLSchema } from 'graphql';
|
|
3
3
|
import { TokenObject } from '../auth/authenticate';
|
|
4
4
|
import { AuthProvider, Schema, TinaSchema } from '@tinacms/schema-tools';
|
|
5
|
-
import { SearchClient } from '@tinacms/search/
|
|
5
|
+
import { SearchClient, SearchOptions, SearchQueryResponse, IndexableDocument, FuzzySearchOptions } from '@tinacms/search/index-client';
|
|
6
|
+
interface TinaSearchConfig {
|
|
7
|
+
stopwordLanguages?: string[];
|
|
8
|
+
fuzzyEnabled?: boolean;
|
|
9
|
+
fuzzyOptions?: FuzzySearchOptions;
|
|
10
|
+
}
|
|
6
11
|
import gql from 'graphql-tag';
|
|
7
12
|
import { TinaCloudProject } from './types';
|
|
8
13
|
export * from './authProvider';
|
|
@@ -141,6 +146,26 @@ export declare class Client {
|
|
|
141
146
|
}[]>;
|
|
142
147
|
usingProtectedBranch(): boolean;
|
|
143
148
|
createBranch({ baseBranch, branchName }: BranchData): Promise<string>;
|
|
149
|
+
getLatestVersion(): Promise<LatestVersionResponse>;
|
|
150
|
+
/**
|
|
151
|
+
* Initiate and poll for the results of an editorial workflow operation
|
|
152
|
+
*
|
|
153
|
+
* @param options Editorial workflow options
|
|
154
|
+
* @returns Object with branch and PR info when complete
|
|
155
|
+
*/
|
|
156
|
+
executeEditorialWorkflow(options: {
|
|
157
|
+
branchName: string;
|
|
158
|
+
baseBranch: string;
|
|
159
|
+
prTitle?: string;
|
|
160
|
+
graphQLContentOp?: {
|
|
161
|
+
query: string;
|
|
162
|
+
variables: Record<string, unknown>;
|
|
163
|
+
};
|
|
164
|
+
onStatusUpdate?: (status: {
|
|
165
|
+
status: string;
|
|
166
|
+
message?: string;
|
|
167
|
+
}) => void;
|
|
168
|
+
}): Promise<any>;
|
|
144
169
|
}
|
|
145
170
|
export declare const DEFAULT_LOCAL_TINA_GQL_SERVER_URL = "http://localhost:4001/graphql";
|
|
146
171
|
export declare class LocalClient extends Client {
|
|
@@ -151,37 +176,30 @@ export declare class LocalClient extends Client {
|
|
|
151
176
|
get isLocalMode(): boolean;
|
|
152
177
|
}
|
|
153
178
|
export declare class TinaCMSSearchClient implements SearchClient {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
results: any[];
|
|
164
|
-
nextCursor: string | null;
|
|
165
|
-
total: number;
|
|
166
|
-
prevCursor: string | null;
|
|
167
|
-
}>;
|
|
168
|
-
del(ids: string[]): Promise<any>;
|
|
169
|
-
put(docs: any[]): Promise<any>;
|
|
179
|
+
protected readonly client: Client;
|
|
180
|
+
protected readonly fuzzyEnabled: boolean;
|
|
181
|
+
protected readonly stopwordLanguages?: string[];
|
|
182
|
+
protected readonly defaultFuzzyOptions?: FuzzySearchOptions;
|
|
183
|
+
constructor(client: Client, tinaSearchConfig?: TinaSearchConfig);
|
|
184
|
+
protected buildSearchUrl(query: string, options?: SearchOptions, useFuzzy?: boolean): string;
|
|
185
|
+
query(query: string, options?: SearchOptions): Promise<SearchQueryResponse>;
|
|
186
|
+
del(ids: string[]): Promise<void>;
|
|
187
|
+
put(docs: IndexableDocument[]): Promise<void>;
|
|
170
188
|
supportsClientSideIndexing(): boolean;
|
|
171
189
|
}
|
|
172
190
|
export declare class LocalSearchClient implements SearchClient {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
total: number;
|
|
182
|
-
prevCursor: string | null;
|
|
183
|
-
}>;
|
|
184
|
-
del(ids: string[]): Promise<any>;
|
|
185
|
-
put(docs: any[]): Promise<any>;
|
|
191
|
+
protected readonly client: Client;
|
|
192
|
+
protected readonly fuzzyEnabled: boolean;
|
|
193
|
+
protected readonly defaultFuzzyOptions?: FuzzySearchOptions;
|
|
194
|
+
constructor(client: Client, tinaSearchConfig?: Omit<TinaSearchConfig, 'stopwordLanguages'>);
|
|
195
|
+
protected buildSearchUrl(query: string, options?: SearchOptions, useFuzzy?: boolean): string;
|
|
196
|
+
query(query: string, options?: SearchOptions): Promise<SearchQueryResponse>;
|
|
197
|
+
del(_ids: string[]): Promise<void>;
|
|
198
|
+
put(_docs: IndexableDocument[]): Promise<void>;
|
|
186
199
|
supportsClientSideIndexing(): boolean;
|
|
187
200
|
}
|
|
201
|
+
export type PackageVersionInfo = {
|
|
202
|
+
version: string;
|
|
203
|
+
publishedAt: string;
|
|
204
|
+
};
|
|
205
|
+
export type LatestVersionResponse = Record<string, PackageVersionInfo>;
|
package/dist/react.d.ts
CHANGED
|
@@ -1 +1,41 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function useTina<T extends object>(props: {
|
|
2
|
+
query: string;
|
|
3
|
+
variables: object;
|
|
4
|
+
data: T;
|
|
5
|
+
experimental___selectFormByFormId?: () => string | false | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
data: T;
|
|
8
|
+
isClient: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function useEditState(): {
|
|
11
|
+
edit: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Grab the field name for the given attribute
|
|
15
|
+
* to signal to Tina which DOM element the field
|
|
16
|
+
* is working with.
|
|
17
|
+
*/
|
|
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 {
|
|
23
|
+
_content_source?: {
|
|
24
|
+
queryId: string;
|
|
25
|
+
path: (number | string)[];
|
|
26
|
+
};
|
|
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;
|
|
35
|
+
/**
|
|
36
|
+
* This is a pretty rudimentary approach to hashing the query and variables to
|
|
37
|
+
* ensure we treat multiple queries on the page uniquely. It's possible
|
|
38
|
+
* that we would have collisions, and I'm not sure of the likeliness but seems
|
|
39
|
+
* like it'd be rare.
|
|
40
|
+
*/
|
|
41
|
+
export declare const hashFromQuery: (input: string) => string;
|