tinacms 0.0.0-db8aa8e-20250228034006 → 0.0.0-df15737-20250329200825

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
@@ -1,34 +1 @@
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
- export declare const tinaField: <T extends (object & {
19
- _content_source?: {
20
- queryId: string;
21
- path: (number | string)[];
22
- };
23
- }) | undefined | null>(object: T, property?: keyof Omit<NonNullable<T>, "__typename" | "_sys">, index?: number) => string;
24
- export declare const addMetadata: <T extends object>(id: string, object: T & {
25
- type?: string;
26
- _content_source?: unknown;
27
- }, path: (string | number)[]) => T;
28
- /**
29
- * This is a pretty rudimentary approach to hashing the query and variables to
30
- * ensure we treat multiple queries on the page uniquely. It's possible
31
- * that we would have collisions, and I'm not sure of the likeliness but seems
32
- * like it'd be rare.
33
- */
34
- export declare const hashFromQuery: (input: string) => string;
1
+ export * from "../src/react"
package/dist/react.js CHANGED
@@ -18,6 +18,9 @@
18
18
  React.useEffect(() => {
19
19
  setIsClient(true);
20
20
  setData(props.data);
21
+ parent.postMessage({
22
+ type: "url-changed"
23
+ });
21
24
  }, [id]);
22
25
  React.useEffect(() => {
23
26
  if (quickEditEnabled) {
package/dist/react.mjs CHANGED
@@ -15,6 +15,9 @@ function useTina(props) {
15
15
  React.useEffect(() => {
16
16
  setIsClient(true);
17
17
  setData(props.data);
18
+ parent.postMessage({
19
+ type: "url-changed"
20
+ });
18
21
  }, [id]);
19
22
  React.useEffect(() => {
20
23
  if (quickEditEnabled) {
@@ -1,142 +1 @@
1
- /**
2
-
3
- */
4
- import React from 'react';
5
- type BaseComponents = {
6
- h1?: {
7
- children: JSX.Element;
8
- };
9
- h2?: {
10
- children: JSX.Element;
11
- };
12
- h3?: {
13
- children: JSX.Element;
14
- };
15
- h4?: {
16
- children: JSX.Element;
17
- };
18
- h5?: {
19
- children: JSX.Element;
20
- };
21
- h6?: {
22
- children: JSX.Element;
23
- };
24
- p?: {
25
- children: JSX.Element;
26
- };
27
- a?: {
28
- url: string;
29
- children: JSX.Element;
30
- };
31
- italic?: {
32
- children: JSX.Element;
33
- };
34
- bold?: {
35
- children: JSX.Element;
36
- };
37
- strikethrough?: {
38
- children: JSX.Element;
39
- };
40
- underline?: {
41
- children: JSX.Element;
42
- };
43
- code?: {
44
- children: JSX.Element;
45
- };
46
- text?: {
47
- children: string;
48
- };
49
- ul?: {
50
- children: JSX.Element;
51
- };
52
- ol?: {
53
- children: JSX.Element;
54
- };
55
- li?: {
56
- children: JSX.Element;
57
- };
58
- lic?: {
59
- children: JSX.Element;
60
- };
61
- block_quote?: {
62
- children: JSX.Element;
63
- };
64
- code_block?: {
65
- lang?: string;
66
- value: string;
67
- };
68
- mermaid?: {
69
- value: string;
70
- };
71
- img?: {
72
- url: string;
73
- caption?: string;
74
- alt?: string;
75
- };
76
- hr?: {};
77
- break?: {};
78
- maybe_mdx?: {
79
- children: JSX.Element;
80
- };
81
- html?: {
82
- value: string;
83
- };
84
- html_inline?: {
85
- value: string;
86
- };
87
- table?: {
88
- align?: ('left' | 'right' | 'center')[];
89
- tableRows: {
90
- tableCells: {
91
- value: TinaMarkdownContent;
92
- }[];
93
- }[];
94
- };
95
- component_missing?: {
96
- name: string;
97
- };
98
- };
99
- type BaseComponentSignature = {
100
- [BK in keyof BaseComponents]: (props: BaseComponents[BK]) => JSX.Element;
101
- };
102
- /**
103
- * Define the allowed components and their props
104
- * ```ts
105
- * const components:
106
- * Components<{
107
- * BlockQuote: {
108
- * children: TinaMarkdownContent;
109
- * authorName: string;
110
- * };
111
- * }> = {
112
- * BlockQuote: (props: {
113
- * children: TinaMarkdownContent;
114
- * authorName: string;
115
- * }) => {
116
- * return (
117
- * <div>
118
- * <blockquote>
119
- * <TinaMarkdown content={props.children} />
120
- * {props.authorName}
121
- * </blockquote>
122
- * </div>
123
- * );
124
- * }
125
- * }
126
- * }
127
- * ```
128
- */
129
- export type Components<ComponentAndProps extends object> = {
130
- [K in keyof ComponentAndProps]: (props: ComponentAndProps[K]) => JSX.Element;
131
- } & BaseComponentSignature;
132
- export type TinaMarkdownContent = {
133
- type: string;
134
- children: TinaMarkdownContent[];
135
- };
136
- export declare const TinaMarkdown: <CustomComponents extends {
137
- [key: string]: object;
138
- } = any>({ content, components, }: {
139
- content: TinaMarkdownContent | TinaMarkdownContent[];
140
- components?: Components<{}> | Components<{ [BK in keyof CustomComponents]: (props: CustomComponents[BK]) => JSX.Element; }>;
141
- }) => React.JSX.Element;
142
- export {};
1
+ export * from "../../src/rich-text/index"
@@ -1,10 +1 @@
1
- /**
2
-
3
- */
4
- import React from 'react';
5
- import { themes } from 'prism-react-renderer';
6
- export declare const Prism: (props: {
7
- value: string;
8
- lang?: string;
9
- theme?: keyof typeof themes;
10
- }) => React.JSX.Element;
1
+ export * from "../../src/rich-text/prism"
@@ -1,8 +1,9 @@
1
- import * as React from 'react';
2
1
  import type { Form } from '../../forms';
3
- export declare const FormsView: ({ children, }: {
4
- children?: React.ReactChild | React.ReactChild[];
5
- }) => React.JSX.Element;
2
+ import * as React from 'react';
3
+ export interface FormsViewProps {
4
+ loadingPlaceholder?: React.FC;
5
+ }
6
+ export declare const FormsView: ({ loadingPlaceholder }?: FormsViewProps) => React.JSX.Element;
6
7
  export interface MultiformFormHeaderProps {
7
8
  activeForm: {
8
9
  activeFieldName?: string;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const SidebarLoadingPlaceholder: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const SidebarNoFormsPlaceholder: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { EventBus, Callback } from '../core';
2
1
  import * as React from 'react';
2
+ import { Callback, EventBus } from '../core';
3
3
  export interface SidebarStateOptions {
4
4
  position?: SidebarPosition;
5
5
  buttons?: SidebarButtons;
@@ -22,7 +22,7 @@ export declare type DefaultSidebarState = 'open' | 'closed';
22
22
  export declare class SidebarState {
23
23
  private events;
24
24
  private _isOpen;
25
- placeholder: React.FC;
25
+ loadingPlaceholder: React.FC;
26
26
  defaultState: DefaultSidebarState;
27
27
  position: SidebarPosition;
28
28
  renderNav: boolean;
@@ -58,6 +58,9 @@ export type TinaAction = {
58
58
  } | {
59
59
  type: 'sidebar:set-display-state';
60
60
  value: TinaState['sidebarDisplayState'] | 'openOrFull';
61
+ } | {
62
+ type: 'sidebar:set-loading-state';
63
+ value: boolean;
61
64
  };
62
65
  export interface TinaState {
63
66
  activeFormId: string | null;
@@ -76,6 +79,7 @@ export interface TinaState {
76
79
  }[];
77
80
  formLists: FormList[];
78
81
  editingMode: 'visual' | 'basic';
82
+ isLoadingContent: boolean;
79
83
  quickEditSupported: boolean;
80
84
  sidebarDisplayState: 'closed' | 'open' | 'fullscreen';
81
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.0.0-db8aa8e-20250228034006",
3
+ "version": "0.0.0-df15737-20250329200825",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -129,11 +129,9 @@
129
129
  "webfontloader": "1.6.28",
130
130
  "yup": "^1.6.1",
131
131
  "zod": "^3.24.2",
132
- "react": "^18.3.1",
133
- "react-dom": "^18.3.1",
134
- "@tinacms/mdx": "0.0.0-db8aa8e-20250228034006",
135
- "@tinacms/schema-tools": "0.0.0-db8aa8e-20250228034006",
136
- "@tinacms/search": "0.0.0-db8aa8e-20250228034006"
132
+ "@tinacms/search": "0.0.0-df15737-20250329200825",
133
+ "@tinacms/mdx": "1.6.1",
134
+ "@tinacms/schema-tools": "1.7.2"
137
135
  },
138
136
  "devDependencies": {
139
137
  "@graphql-tools/utils": "^10.8.1",
@@ -166,7 +164,7 @@
166
164
  "typescript": "^5.7.3",
167
165
  "vite": "^5.4.14",
168
166
  "vitest": "^2.1.9",
169
- "@tinacms/scripts": "0.0.0-db8aa8e-20250228034006"
167
+ "@tinacms/scripts": "1.3.3"
170
168
  },
171
169
  "peerDependencies": {
172
170
  "react": ">=16.14.0",
@@ -1,8 +0,0 @@
1
- /**
2
-
3
-
4
-
5
- */
6
- import * as React from 'react';
7
- export declare const PendingFormsPlaceholder: () => React.JSX.Element;
8
- export declare const NoFormsPlaceholder: () => React.JSX.Element;