@firecms/core 3.3.0-canary.451aa49 → 3.3.0-canary.a5780ce

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.
Files changed (135) hide show
  1. package/dist/app/AppBar.d.ts +1 -1
  2. package/dist/app/Drawer.d.ts +1 -1
  3. package/dist/components/AIIcon.d.ts +3 -2
  4. package/dist/components/ArrayContainer.d.ts +3 -3
  5. package/dist/components/CircularProgressCenter.d.ts +2 -1
  6. package/dist/components/ClearFilterSortButton.d.ts +1 -1
  7. package/dist/components/ConfirmationDialog.d.ts +1 -1
  8. package/dist/components/DeleteEntityDialog.d.ts +2 -1
  9. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
  10. package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +2 -1
  11. package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +1 -1
  12. package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
  13. package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +1 -1
  14. package/dist/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +1 -1
  15. package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +4 -3
  16. package/dist/components/EntityCollectionView/Board.d.ts +2 -1
  17. package/dist/components/EntityCollectionView/BoardColumnTitle.d.ts +1 -1
  18. package/dist/components/EntityCollectionView/BoardSortableList.d.ts +1 -1
  19. package/dist/components/EntityCollectionView/CollectionDataErrorBanner.d.ts +2 -1
  20. package/dist/components/EntityCollectionView/EntityBoardCard.d.ts +1 -1
  21. package/dist/components/EntityCollectionView/EntityCard.d.ts +2 -1
  22. package/dist/components/EntityCollectionView/EntityCollectionBoardView.d.ts +1 -1
  23. package/dist/components/EntityCollectionView/EntityCollectionCardView.d.ts +1 -1
  24. package/dist/components/EntityCollectionView/EntityCollectionViewActions.d.ts +2 -1
  25. package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +2 -1
  26. package/dist/components/EntityCollectionView/FiltersDialog.d.ts +2 -1
  27. package/dist/components/EntityCollectionView/ViewModeToggle.d.ts +2 -1
  28. package/dist/components/EntityJsonPreview.d.ts +2 -1
  29. package/dist/components/EntityPreview.d.ts +1 -1
  30. package/dist/components/EntityView.d.ts +2 -1
  31. package/dist/components/ErrorBoundary.d.ts +1 -1
  32. package/dist/components/ErrorTooltip.d.ts +2 -1
  33. package/dist/components/FieldCaption.d.ts +1 -1
  34. package/dist/components/FireCMSLogo.d.ts +1 -1
  35. package/dist/components/HomePage/DefaultHomePage.d.ts +1 -1
  36. package/dist/components/HomePage/FavouritesView.d.ts +1 -1
  37. package/dist/components/HomePage/HomePageDnD.d.ts +4 -4
  38. package/dist/components/HomePage/NavigationCardBinding.d.ts +2 -1
  39. package/dist/components/HomePage/NavigationGroup.d.ts +2 -2
  40. package/dist/components/HomePage/RenameGroupDialog.d.ts +2 -1
  41. package/dist/components/HomePage/SmallNavigationCard.d.ts +1 -1
  42. package/dist/components/LanguageToggle.d.ts +2 -1
  43. package/dist/components/NotFoundPage.d.ts +2 -1
  44. package/dist/components/PropertyCollectionView.d.ts +2 -1
  45. package/dist/components/PropertyIdCopyTooltip.d.ts +2 -2
  46. package/dist/components/ReferenceTable/ReferenceSelectionTable.d.ts +1 -1
  47. package/dist/components/ReferenceWidget.d.ts +2 -1
  48. package/dist/components/SearchIconsView.d.ts +2 -1
  49. package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
  50. package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -1
  51. package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -1
  52. package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -1
  53. package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -1
  54. package/dist/components/UnsavedChangesDialog.d.ts +1 -1
  55. package/dist/components/UserDisplay.d.ts +1 -1
  56. package/dist/components/VirtualTable/VirtualTableHeaderRow.d.ts +2 -1
  57. package/dist/components/VirtualTable/fields/VirtualTableDateField.d.ts +1 -1
  58. package/dist/components/VirtualTable/fields/VirtualTableInput.d.ts +2 -1
  59. package/dist/components/VirtualTable/fields/VirtualTableNumberInput.d.ts +2 -1
  60. package/dist/components/VirtualTable/fields/VirtualTableSelect.d.ts +1 -1
  61. package/dist/components/VirtualTable/fields/VirtualTableSwitch.d.ts +2 -1
  62. package/dist/components/VirtualTable/fields/VirtualTableUserSelect.d.ts +1 -1
  63. package/dist/core/DefaultAppBar.d.ts +1 -1
  64. package/dist/core/DefaultDrawer.d.ts +2 -2
  65. package/dist/core/DrawerNavigationGroup.d.ts +1 -1
  66. package/dist/core/DrawerNavigationItem.d.ts +1 -1
  67. package/dist/core/EntityEditView.d.ts +2 -2
  68. package/dist/core/EntityEditViewFormActions.d.ts +2 -1
  69. package/dist/core/EntitySidePanel.d.ts +2 -1
  70. package/dist/core/FireCMS.d.ts +2 -1
  71. package/dist/core/FireCMSRouter.d.ts +1 -1
  72. package/dist/core/SideDialogs.d.ts +1 -1
  73. package/dist/editor/components/SlashCommandMenu.d.ts +2 -1
  74. package/dist/editor/editor.d.ts +1 -1
  75. package/dist/editor/selectors/color-selector.d.ts +1 -1
  76. package/dist/editor/selectors/link-selector.d.ts +1 -1
  77. package/dist/editor/selectors/node-selector.d.ts +1 -1
  78. package/dist/editor/selectors/text-buttons.d.ts +1 -1
  79. package/dist/form/EntityForm.d.ts +1 -1
  80. package/dist/form/EntityFormActions.d.ts +1 -1
  81. package/dist/form/components/CustomIdField.d.ts +2 -1
  82. package/dist/form/components/FieldHelperText.d.ts +1 -1
  83. package/dist/form/components/FormEntry.d.ts +1 -1
  84. package/dist/form/components/FormLayout.d.ts +1 -1
  85. package/dist/form/components/LabelWithIconAndTooltip.d.ts +1 -1
  86. package/dist/form/components/LocalChangesMenu.d.ts +2 -1
  87. package/dist/form/components/StorageItemPreview.d.ts +2 -1
  88. package/dist/form/components/StorageUploadProgress.d.ts +2 -1
  89. package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +2 -1
  90. package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +2 -1
  91. package/dist/form/field_bindings/BlockFieldBinding.d.ts +2 -1
  92. package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +2 -1
  93. package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +2 -1
  94. package/dist/form/field_bindings/MapFieldBinding.d.ts +2 -1
  95. package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +2 -1
  96. package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +2 -1
  97. package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +2 -1
  98. package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +2 -1
  99. package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +2 -1
  100. package/dist/form/field_bindings/RepeatFieldBinding.d.ts +2 -1
  101. package/dist/form/field_bindings/SelectFieldBinding.d.ts +2 -1
  102. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +3 -2
  103. package/dist/form/field_bindings/SwitchFieldBinding.d.ts +2 -1
  104. package/dist/form/field_bindings/TextFieldBinding.d.ts +2 -1
  105. package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +2 -1
  106. package/dist/i18n/FireCMSi18nProvider.d.ts +2 -2
  107. package/dist/index.es.js +260 -176
  108. package/dist/index.es.js.map +1 -1
  109. package/dist/index.umd.js +260 -176
  110. package/dist/index.umd.js.map +1 -1
  111. package/dist/preview/components/ArrayEnumPreview.d.ts +2 -1
  112. package/dist/preview/components/AsyncPreviewComponent.d.ts +1 -1
  113. package/dist/preview/components/EmptyValue.d.ts +2 -1
  114. package/dist/preview/components/EnumValuesChip.d.ts +1 -1
  115. package/dist/preview/components/ImagePreview.d.ts +2 -1
  116. package/dist/preview/components/ReferencePreview.d.ts +1 -1
  117. package/dist/preview/components/StorageThumbnail.d.ts +1 -1
  118. package/dist/preview/components/UserPreview.d.ts +2 -1
  119. package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +2 -1
  120. package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +1 -1
  121. package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +2 -1
  122. package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +2 -1
  123. package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +2 -1
  124. package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +1 -1
  125. package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +2 -1
  126. package/dist/preview/property_previews/MapPropertyPreview.d.ts +3 -2
  127. package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +5 -4
  128. package/dist/routes/FireCMSRoute.d.ts +2 -1
  129. package/dist/util/property_utils.d.ts +1 -1
  130. package/package.json +5 -5
  131. package/src/components/EntityCollectionTable/internal/common.tsx +2 -2
  132. package/src/editor/editor.tsx +20 -1
  133. package/src/editor/markdown.ts +89 -1
  134. package/src/internal/useBuildSideEntityController.tsx +1 -1
  135. package/src/preview/PropertyPreview.tsx +3 -3
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { EnumValueConfig } from "../../types";
2
3
  import { PreviewSize } from "../PropertyPreviewProps";
3
4
  /**
@@ -8,4 +9,4 @@ export declare function ArrayEnumPreview({ name, value, enumValues, size }: {
8
9
  name: string | undefined;
9
10
  enumValues: EnumValueConfig[];
10
11
  size: PreviewSize;
11
- }): import("react/jsx-runtime").JSX.Element;
12
+ }): React.JSX.Element;
@@ -8,4 +8,4 @@ export interface AsyncPreviewComponentProps {
8
8
  *
9
9
  * @group Preview components
10
10
  */
11
- export declare const AsyncPreviewComponent: React.MemoExoticComponent<(<M extends Record<string, any>>({ builder }: AsyncPreviewComponentProps) => import("react/jsx-runtime").JSX.Element)>;
11
+ export declare const AsyncPreviewComponent: React.MemoExoticComponent<(<M extends Record<string, any>>({ builder }: AsyncPreviewComponentProps) => React.JSX.Element)>;
@@ -1,4 +1,5 @@
1
+ import React from "react";
1
2
  /**
2
3
  * @group Preview components
3
4
  */
4
- export declare function EmptyValue(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function EmptyValue(): React.JSX.Element;
@@ -10,4 +10,4 @@ export interface EnumValuesChipProps {
10
10
  /**
11
11
  * @group Preview components
12
12
  */
13
- export declare function EnumValuesChip({ enumValues, enumKey, size, className, children }: EnumValuesChipProps): import("react/jsx-runtime").JSX.Element | null;
13
+ export declare function EnumValuesChip({ enumValues, enumKey, size, className, children }: EnumValuesChipProps): React.JSX.Element | null;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { PreviewSize } from "../PropertyPreviewProps";
2
3
  /**
3
4
  * @group Preview components
@@ -13,4 +14,4 @@ export interface ImagePreviewProps {
13
14
  /**
14
15
  * @group Preview components
15
16
  */
16
- export declare function ImagePreview({ size, url, fill }: ImagePreviewProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ImagePreview({ size, url, fill }: ImagePreviewProps): React.JSX.Element;
@@ -14,4 +14,4 @@ export type ReferencePreviewProps = {
14
14
  /**
15
15
  * @group Preview components
16
16
  */
17
- export declare const ReferencePreview: (props: ReferencePreviewProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const ReferencePreview: (props: ReferencePreviewProps) => React.JSX.Element;
@@ -11,5 +11,5 @@ type StorageThumbnailProps = {
11
11
  * @group Preview components
12
12
  */
13
13
  export declare const StorageThumbnail: React.FunctionComponent<StorageThumbnailProps>;
14
- export declare function StorageThumbnailInternal({ storeUrl, interactive, storagePathOrDownloadUrl, size, fill }: StorageThumbnailProps): import("react/jsx-runtime").JSX.Element | null;
14
+ export declare function StorageThumbnailInternal({ storeUrl, interactive, storagePathOrDownloadUrl, size, fill }: StorageThumbnailProps): React.JSX.Element | null;
15
15
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { PropertyPreviewProps } from "../PropertyPreviewProps";
2
3
  /**
3
4
  * Preview component for displaying user information.
@@ -5,4 +6,4 @@ import { PropertyPreviewProps } from "../PropertyPreviewProps";
5
6
  *
6
7
  * @group Preview components
7
8
  */
8
- export declare function UserPreview({ value }: PropertyPreviewProps<string>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function UserPreview({ value }: PropertyPreviewProps<string>): React.JSX.Element;
@@ -1,5 +1,6 @@
1
+ import React from "react";
1
2
  import { PropertyPreviewProps } from "../PropertyPreviewProps";
2
3
  /**
3
4
  * @group Preview components
4
5
  */
5
- export declare function ArrayOfMapsPreview({ propertyKey, value, property: inputProperty, size, }: PropertyPreviewProps<Record<string, any>[]>): import("react/jsx-runtime").JSX.Element | null;
6
+ export declare function ArrayOfMapsPreview({ propertyKey, value, property: inputProperty, size, }: PropertyPreviewProps<Record<string, any>[]>): React.JSX.Element | null;
@@ -2,4 +2,4 @@ import { PropertyPreviewProps } from "../PropertyPreviewProps";
2
2
  /**
3
3
  * @group Preview components
4
4
  */
5
- export declare function ArrayOfReferencesPreview({ propertyKey, value, property: inputProperty, size }: PropertyPreviewProps<any[]>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function ArrayOfReferencesPreview({ propertyKey, value, property: inputProperty, size }: PropertyPreviewProps<any[]>): import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
+ import React from "react";
1
2
  import { PropertyPreviewProps } from "../PropertyPreviewProps";
2
3
  /**
3
4
  * @group Preview components
4
5
  */
5
- export declare function ArrayOfStorageComponentsPreview({ propertyKey, value, property: inputProperty, size }: PropertyPreviewProps<any[]>): import("react/jsx-runtime").JSX.Element | null;
6
+ export declare function ArrayOfStorageComponentsPreview({ propertyKey, value, property: inputProperty, size }: PropertyPreviewProps<any[]>): React.JSX.Element | null;
@@ -1,5 +1,6 @@
1
+ import React from "react";
1
2
  import { PropertyPreviewProps } from "../../preview";
2
3
  /**
3
4
  * @group Preview components
4
5
  */
5
- export declare function ArrayOfStringsPreview({ propertyKey, value, property: inputProperty, size }: PropertyPreviewProps<string[]>): import("react/jsx-runtime").JSX.Element | null;
6
+ export declare function ArrayOfStringsPreview({ propertyKey, value, property: inputProperty, size }: PropertyPreviewProps<string[]>): React.JSX.Element | null;
@@ -1,5 +1,6 @@
1
+ import React from "react";
1
2
  import { PropertyPreviewProps } from "../PropertyPreviewProps";
2
3
  /**
3
4
  * @group Preview components
4
5
  */
5
- export declare function ArrayOneOfPreview({ propertyKey, value, property: inputProperty, size, }: PropertyPreviewProps<any[]>): import("react/jsx-runtime").JSX.Element | null;
6
+ export declare function ArrayOneOfPreview({ propertyKey, value, property: inputProperty, size, }: PropertyPreviewProps<any[]>): React.JSX.Element | null;
@@ -2,4 +2,4 @@ import { PropertyPreviewProps } from "../PropertyPreviewProps";
2
2
  /**
3
3
  * @group Preview components
4
4
  */
5
- export declare function ArrayPropertyEnumPreview({ propertyKey, value, property, size }: PropertyPreviewProps<string[] | number[]>): import("react/jsx-runtime").JSX.Element | null;
5
+ export declare function ArrayPropertyEnumPreview({ propertyKey, value, property, size }: PropertyPreviewProps<string[] | number[]>): import("react").JSX.Element | null;
@@ -1,5 +1,6 @@
1
+ import React from "react";
1
2
  import { PropertyPreviewProps } from "../PropertyPreviewProps";
2
3
  /**
3
4
  * @group Preview components
4
5
  */
5
- export declare function ArrayPropertyPreview({ propertyKey, value, property: inputProperty, size }: PropertyPreviewProps<any[]>): import("react/jsx-runtime").JSX.Element | null;
6
+ export declare function ArrayPropertyPreview({ propertyKey, value, property: inputProperty, size }: PropertyPreviewProps<any[]>): React.JSX.Element | null;
@@ -1,8 +1,9 @@
1
+ import React from "react";
1
2
  import { PropertyPreviewProps } from "../PropertyPreviewProps";
2
3
  /**
3
4
  * @group Preview components
4
5
  */
5
- export declare function MapPropertyPreview<T extends Record<string, any> = Record<string, any>>({ propertyKey, value, property, size }: PropertyPreviewProps<T>): import("react/jsx-runtime").JSX.Element | null;
6
+ export declare function MapPropertyPreview<T extends Record<string, any> = Record<string, any>>({ propertyKey, value, property, size }: PropertyPreviewProps<T>): React.JSX.Element | null;
6
7
  export declare function KeyValuePreview({ value }: {
7
8
  value: any;
8
- }): import("react/jsx-runtime").JSX.Element | null;
9
+ }): React.JSX.Element | null;
@@ -1,4 +1,5 @@
1
1
  import { ResolvedProperty } from "../../types";
2
+ import React from "react";
2
3
  import { PreviewSize } from "../PropertyPreviewProps";
3
4
  export interface SkeletonPropertyComponentProps {
4
5
  property: ResolvedProperty;
@@ -8,7 +9,7 @@ export interface SkeletonPropertyComponentProps {
8
9
  * @group Preview components
9
10
  */
10
11
  export declare function SkeletonPropertyComponent({ property, size }: SkeletonPropertyComponentProps): any;
11
- export declare function renderSkeletonImageThumbnail(size: PreviewSize, fill?: boolean): import("react/jsx-runtime").JSX.Element;
12
- export declare function renderSkeletonText(index?: number, width?: number): import("react/jsx-runtime").JSX.Element;
13
- export declare function renderSkeletonCaptionText(index?: number): import("react/jsx-runtime").JSX.Element;
14
- export declare function renderSkeletonIcon(): import("react/jsx-runtime").JSX.Element;
12
+ export declare function renderSkeletonImageThumbnail(size: PreviewSize, fill?: boolean): React.JSX.Element;
13
+ export declare function renderSkeletonText(index?: number, width?: number): React.JSX.Element;
14
+ export declare function renderSkeletonCaptionText(index?: number): React.JSX.Element;
15
+ export declare function renderSkeletonIcon(): React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare function FireCMSRoute(): import("react/jsx-runtime").JSX.Element | null;
1
+ import React from "react";
2
+ export declare function FireCMSRoute(): React.JSX.Element | null;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { AuthController, EntityCollection, PropertiesOrBuilders, PropertyConfig, PropertyOrBuilder, ResolvedProperties, ResolvedProperty } from "../types";
3
3
  export declare function isReferenceProperty(authController: AuthController, propertyOrBuilder: PropertyOrBuilder, fields: Record<string, PropertyConfig>): boolean | null;
4
4
  export declare function getIdIcon(size: "small" | "medium" | "large"): React.ReactNode;
5
- export declare function getIconForWidget(widget: PropertyConfig | undefined, size: "small" | "medium" | "large"): import("react/jsx-runtime").JSX.Element;
5
+ export declare function getIconForWidget(widget: PropertyConfig | undefined, size: "small" | "medium" | "large"): React.JSX.Element;
6
6
  export declare function getIconForProperty(property: PropertyOrBuilder<any> | ResolvedProperty<any>, size?: "small" | "medium" | "large", fields?: Record<string, PropertyConfig>): React.ReactNode;
7
7
  export declare function getColorForProperty(property: PropertyOrBuilder, fields: Record<string, PropertyConfig>): string;
8
8
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.3.0-canary.451aa49",
4
+ "version": "3.3.0-canary.a5780ce",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -10,7 +10,7 @@
10
10
  "license": "MIT",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "https://github.com/firecmsco/firecms.git",
13
+ "url": "https://github.com/FireCMSco/firecms.git",
14
14
  "directory": "packages/firecms_core"
15
15
  },
16
16
  "main": "./dist/index.umd.js",
@@ -53,8 +53,8 @@
53
53
  "@dnd-kit/core": "^6.3.1",
54
54
  "@dnd-kit/modifiers": "^9.0.0",
55
55
  "@dnd-kit/sortable": "^10.0.0",
56
- "@firecms/formex": "^3.3.0-canary.451aa49",
57
- "@firecms/ui": "^3.3.0-canary.451aa49",
56
+ "@firecms/formex": "^3.3.0-canary.a5780ce",
57
+ "@firecms/ui": "^3.3.0-canary.a5780ce",
58
58
  "@floating-ui/dom": "^1.7.4",
59
59
  "@radix-ui/react-portal": "^1.1.10",
60
60
  "@radix-ui/react-slot": "^1.2.4",
@@ -136,7 +136,7 @@
136
136
  "dist",
137
137
  "src"
138
138
  ],
139
- "gitHead": "772b4a7f64893038f0cc13669d6bc66ec858fc49",
139
+ "gitHead": "9ecf37abf793bd2f2daaaed6f517ee5ee19b01ae",
140
140
  "publishConfig": {
141
141
  "access": "public"
142
142
  },
@@ -23,14 +23,14 @@ export function getTablePropertyColumnWidth(property: ResolvedProperty): number
23
23
  if (property.dataType === "string") {
24
24
  if (property.url) {
25
25
  return 280;
26
+ } else if (property.markdown) {
27
+ return 300;
26
28
  } else if (property.storage) {
27
29
  return 160;
28
30
  } else if (property.enumValues) {
29
31
  return 200;
30
32
  } else if (property.multiline) {
31
33
  return 300;
32
- } else if (property.markdown) {
33
- return 300;
34
34
  } else if (property.email) {
35
35
  return 200;
36
36
  } else {
@@ -148,8 +148,26 @@ export const FireCMSEditor = ({
148
148
  });
149
149
 
150
150
  const doc = state?.doc;
151
+ const mountedRef = useRef(false);
152
+
153
+ // Enable flushing after the initial render cycle completes.
154
+ // ProseMirror initialization (including trailingNodePlugin and
155
+ // appendTransaction) runs synchronously during mount, so any doc
156
+ // change after the first effect cycle is from user interaction.
157
+ useEffect(() => {
158
+ const raf = requestAnimationFrame(() => {
159
+ mountedRef.current = true;
160
+ });
161
+ return () => cancelAnimationFrame(raf);
162
+ }, []);
163
+
151
164
  useEffect(() => {
152
165
  if (!state) return;
166
+ // Skip flush until after mount — the round-trip through
167
+ // parse → ProseMirror → serialize is not idempotent and would
168
+ // produce subtly different markdown on init, making the form
169
+ // dirty without user interaction.
170
+ if (!mountedRef.current) return;
153
171
  const timeout = setTimeout(() => {
154
172
  flushChanges(state);
155
173
  }, 250);
@@ -160,6 +178,7 @@ export const FireCMSEditor = ({
160
178
  if (!view) return;
161
179
  const dom = view.dom;
162
180
  const handleBlur = () => {
181
+ if (!mountedRef.current) return;
163
182
  flushChanges(view.state);
164
183
  };
165
184
  dom.addEventListener("blur", handleBlur);
@@ -236,7 +255,7 @@ export const FireCMSEditor = ({
236
255
  onChange={handleMarkdownChange as any}
237
256
  onBlur={handleMarkdownBlur as any}
238
257
  className={cls(
239
- "w-full h-full min-h-[300px] p-12 bg-transparent resize-none font-mono focus:ring-0",
258
+ "w-full min-h-[300px] p-12 bg-transparent resize-none font-mono focus:ring-0 focus:outline-none outline-none",
240
259
  proseClass
241
260
  )}
242
261
  style={{
@@ -49,6 +49,66 @@ const md = markdownIt({ html: false })
49
49
  .use(markdownItMark)
50
50
  .use(markdownItIns);
51
51
 
52
+ // Override the escape rule so that `\` before a newline is kept as literal
53
+ // text instead of being silently consumed as a hardbreak. The default
54
+ // markdown-it behaviour strips the backslash and produces a <br>, which
55
+ // causes users to lose visible `\` characters in their content.
56
+ md.inline.ruler.at("escape", function escapeOverride(state: any, silent: boolean): boolean {
57
+ let pos = state.pos;
58
+ const max = state.posMax;
59
+
60
+ if (state.src.charCodeAt(pos) !== 0x5C /* \ */) return false;
61
+ pos++;
62
+
63
+ if (pos >= max) return false;
64
+
65
+ const ch1 = state.src.charCodeAt(pos);
66
+
67
+ // KEY CHANGE: when `\` is followed by a newline, output the backslash as
68
+ // literal text and let the normal softbreak handling deal with the newline.
69
+ if (ch1 === 0x0A) {
70
+ if (!silent) {
71
+ state.pending += "\\";
72
+ }
73
+ state.pos = pos; // leave the newline for softbreak to handle
74
+ return true;
75
+ }
76
+
77
+ // For escaped ASCII punctuation, output the character without the backslash
78
+ // (standard markdown escape behaviour: `\*` → `*`).
79
+ let escapedStr = state.src[pos];
80
+ // Handle surrogate pairs
81
+ if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) {
82
+ const ch2 = state.src.charCodeAt(pos + 1);
83
+ if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
84
+ escapedStr += state.src[pos + 1];
85
+ pos++;
86
+ }
87
+ }
88
+
89
+ const origStr = "\\" + escapedStr;
90
+
91
+ if (!silent) {
92
+ // Check if the character is an ASCII punctuation that
93
+ // markdown-it considers escapable (codes < 256 in its lookup table).
94
+ const isEscapable = ch1 < 256 && /[\\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-]/.test(String.fromCharCode(ch1));
95
+ const token = state.push("text_special", "", 0);
96
+ if (isEscapable) {
97
+ token.content = escapedStr;
98
+ } else {
99
+ token.content = origStr;
100
+ }
101
+ token.markup = origStr;
102
+ token.info = "escape";
103
+ }
104
+ state.pos = pos + 1;
105
+ return true;
106
+ });
107
+
108
+ // Also disable the newline rule which redundantly converts `\` + newline
109
+ // to hardbreaks via a separate code path.
110
+ md.inline.ruler.disable(["newline"]);
111
+
52
112
  // Unwrap images from paragraphs so they can be parsed as block nodes by ProseMirror
53
113
  md.core.ruler.after("inline", "image-to-block", (state: any) => {
54
114
  const tokens = state.tokens;
@@ -145,7 +205,35 @@ export const markdownSerializer = new MarkdownSerializer(
145
205
  },
146
206
  table_row() {},
147
207
  table_cell() {},
148
- table_header() {}
208
+ table_header() {},
209
+ // Custom text serializer: since our parser override keeps `\` as
210
+ // literal text (instead of consuming it), we must avoid the default
211
+ // esc() from double-escaping it. We escape all standard markdown
212
+ // specials *except* the backslash itself.
213
+ text(state: any, node: any) {
214
+ const escaped = node.text.replace(/[`*~\[\]_]/g, (m: string, i: number) => {
215
+ // Don't escape mid-word underscores (same logic as default esc)
216
+ if (m === "_" && i > 0 && i + 1 < node.text.length
217
+ && /\w/.test(node.text[i - 1]) && /\w/.test(node.text[i + 1])) {
218
+ return m;
219
+ }
220
+ return "\\" + m;
221
+ });
222
+ // Handle start-of-line patterns that could be parsed as block syntax
223
+ const lines = escaped.split("\n");
224
+ for (let i = 0; i < lines.length; i++) {
225
+ state.write();
226
+ let line = lines[i];
227
+ if (state.atBlockStart || i > 0) {
228
+ line = line
229
+ .replace(/^(\+[ ]|[-*>])/, "\\$&")
230
+ .replace(/^(\s*)(#{1,6})(\s|$)/, '$1\\$2$3')
231
+ .replace(/^(\s*\d+)\.\s/, "$1\\. ");
232
+ }
233
+ state.out += line;
234
+ if (i !== lines.length - 1) state.out += "\n";
235
+ }
236
+ }
149
237
  },
150
238
  {
151
239
  ...defaultMarkdownSerializer.marks,
@@ -32,7 +32,7 @@ export function getEntityViewWidth(props: EntitySidePanelProps<any>, small: bool
32
32
  selectedSecondaryForm
33
33
  } = resolvedSelectedEntityView(props.collection?.entityViews, customizationController, props.selectedTab);
34
34
 
35
- const shouldUseSmallLayout = !props.selectedTab || props.selectedTab === JSON_TAB_VALUE || props.selectedTab === "__history" || Boolean(selectedSecondaryForm);
35
+ const shouldUseSmallLayout = !props.selectedTab || props.selectedTab === JSON_TAB_VALUE || props.selectedTab === "__history" || props.selectedTab === "__raw_data" || Boolean(selectedSecondaryForm);
36
36
 
37
37
  let resolvedWidth: string | undefined;
38
38
  if (props.width) {
@@ -80,7 +80,9 @@ export const PropertyPreview = React.memo(function PropertyPreview<T extends CMS
80
80
  } else if (property.dataType === "string") {
81
81
  const stringProperty = property as ResolvedStringProperty;
82
82
  if (typeof value === "string") {
83
- if (stringProperty.storage) {
83
+ if (stringProperty.markdown) {
84
+ content = <Markdown source={value} size={"small"} />;
85
+ } else if (stringProperty.storage) {
84
86
  const filePath = stringProperty.storage.previewUrl ? stringProperty.storage.previewUrl(value) : value;
85
87
  content = <StorageThumbnail
86
88
  interactive={interactive}
@@ -101,8 +103,6 @@ export const PropertyPreview = React.memo(function PropertyPreview<T extends CMS
101
103
  interactive={interactive}
102
104
  fill={fill}
103
105
  previewType={stringProperty.url} />;
104
- } else if (stringProperty.markdown) {
105
- content = <Markdown source={value} size={"small"} />;
106
106
  } else if (stringProperty.userSelect) {
107
107
  content = <UserPreview
108
108
  value={value}