@tinacms/schema-tools 2.6.0 → 2.7.1

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.
@@ -245,7 +245,7 @@ export type ReferenceField = (FieldGeneric<string, undefined, ReferenceFieldOpti
245
245
  export type PasswordField = (FieldGeneric<string, undefined> | FieldGeneric<string, false>) & BaseField & {
246
246
  type: 'password';
247
247
  };
248
- type ToolbarOverrideType = 'heading' | 'link' | 'image' | 'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'bold' | 'italic' | 'raw' | 'embed' | 'mermaid' | 'table';
248
+ export type ToolbarOverrideType = 'heading' | 'link' | 'image' | 'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'bold' | 'italic' | 'strikethrough' | 'highlight' | 'raw' | 'embed' | 'mermaid' | 'table' | 'hr';
249
249
  type RichTextAst = {
250
250
  type: 'root';
251
251
  children: Record<string, unknown>[];
@@ -302,7 +302,14 @@ export type RichTextTemplate<WithNamespace extends boolean = false> = Template<W
302
302
  type ObjectUiProps = {
303
303
  visualSelector?: boolean;
304
304
  };
305
- export type ObjectField<WithNamespace extends boolean = false> = (FieldGeneric<string, undefined, ObjectUiProps> | FieldGeneric<string, true, ObjectUiProps> | FieldGeneric<string, false, ObjectUiProps>) & MaybeNamespace<WithNamespace> & BaseField & ({
305
+ export type ObjectField<WithNamespace extends boolean = false> = (FieldGeneric<string, undefined, ObjectUiProps> | FieldGeneric<string, true, ObjectUiProps> | FieldGeneric<string, false, ObjectUiProps>) & MaybeNamespace<WithNamespace> & BaseField & {
306
+ /**
307
+ * @default false
308
+ * When `list: true`, automatically opens the form for newly created list items.
309
+ * When used without `list: true`, this does not do anything.
310
+ */
311
+ openFormOnCreate?: boolean;
312
+ } & ({
306
313
  type: 'object';
307
314
  fields: Field<WithNamespace>[];
308
315
  templates?: undefined;
@@ -548,6 +555,29 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
548
555
  */
549
556
  basePath?: string;
550
557
  };
558
+ /**
559
+ * Configuration for the local development server (`tinacms dev`).
560
+ * Has no effect on production deployments.
561
+ */
562
+ server?: {
563
+ /**
564
+ * Origins allowed to make cross-origin requests to the dev server.
565
+ * Defaults to localhost / 127.0.0.1 / [::1] only. Each entry can be a string,
566
+ * RegExp, or `'private'` (expands to RFC 1918 private-network IPs).
567
+ *
568
+ * @example
569
+ * ```ts
570
+ * server: { allowedOrigins: ['https://my-codespace.github.dev'] }
571
+ * ```
572
+ *
573
+ * @example
574
+ * ```ts
575
+ * server: { allowedOrigins: ['private'] }
576
+ * ```
577
+ *
578
+ */
579
+ allowedOrigins?: (RegExp | 'private' | (string & {}))[];
580
+ };
551
581
  media?: {
552
582
  /**
553
583
  * Load a media store like Cloudinary
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tinacms/schema-tools",
3
3
  "type": "module",
4
- "version": "2.6.0",
4
+ "version": "2.7.1",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
@@ -24,7 +24,7 @@
24
24
  "ts-jest": "^29.2.5",
25
25
  "typescript": "^5.7.3",
26
26
  "yup": "^1.6.1",
27
- "@tinacms/scripts": "1.5.0"
27
+ "@tinacms/scripts": "1.6.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": ">=16.14.0",