@contentful/field-editor-markdown 1.11.6 → 1.12.0

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.
@@ -57,8 +57,8 @@ function newReferenceEditorFakeSdk(props) {
57
57
  const sdk = {
58
58
  field,
59
59
  locales,
60
- cmaAdapter: (0, _fieldeditortestutils.createFakeCMAAdapter)({
61
- Entry: {
60
+ cma: {
61
+ entry: {
62
62
  get: async ({ entryId })=>{
63
63
  if (props?.fetchDelay) {
64
64
  await delay(props.fetchDelay);
@@ -75,7 +75,7 @@ function newReferenceEditorFakeSdk(props) {
75
75
  return Promise.reject({});
76
76
  }
77
77
  },
78
- Asset: {
78
+ asset: {
79
79
  get: async ({ assetId })=>{
80
80
  if (props?.fetchDelay) {
81
81
  await delay(props.fetchDelay);
@@ -92,7 +92,7 @@ function newReferenceEditorFakeSdk(props) {
92
92
  return Promise.reject({});
93
93
  }
94
94
  },
95
- Space: {
95
+ space: {
96
96
  get: async (params)=>{
97
97
  if (params.spaceId === _fixtures.spaces.indifferent.sys.id) {
98
98
  return _fixtures.spaces.indifferent;
@@ -100,7 +100,7 @@ function newReferenceEditorFakeSdk(props) {
100
100
  return Promise.reject({});
101
101
  }
102
102
  },
103
- ContentType: {
103
+ contentType: {
104
104
  get: async ({ contentTypeId })=>{
105
105
  if (contentTypeId === _fixtures.contentTypes.published.sys.id) {
106
106
  return _fixtures.contentTypes.published;
@@ -111,7 +111,7 @@ function newReferenceEditorFakeSdk(props) {
111
111
  Locale: {
112
112
  getMany: async ()=>_fixtures.locales.list
113
113
  }
114
- }),
114
+ },
115
115
  space: {
116
116
  ...space,
117
117
  getCachedContentTypes () {
@@ -1,4 +1,4 @@
1
- import { createFakeCMAAdapter, createFakeFieldAPI, createFakeLocalesAPI, createFakeSpaceAPI } from '@contentful/field-editor-test-utils';
1
+ import { createFakeFieldAPI, createFakeLocalesAPI, createFakeSpaceAPI } from '@contentful/field-editor-test-utils';
2
2
  import { assets, contentTypes, entries, locales as localesFixtures, spaces } from './fixtures';
3
3
  const newLink = (linkType, id)=>({
4
4
  sys: {
@@ -47,8 +47,8 @@ export function newReferenceEditorFakeSdk(props) {
47
47
  const sdk = {
48
48
  field,
49
49
  locales,
50
- cmaAdapter: createFakeCMAAdapter({
51
- Entry: {
50
+ cma: {
51
+ entry: {
52
52
  get: async ({ entryId })=>{
53
53
  if (props?.fetchDelay) {
54
54
  await delay(props.fetchDelay);
@@ -65,7 +65,7 @@ export function newReferenceEditorFakeSdk(props) {
65
65
  return Promise.reject({});
66
66
  }
67
67
  },
68
- Asset: {
68
+ asset: {
69
69
  get: async ({ assetId })=>{
70
70
  if (props?.fetchDelay) {
71
71
  await delay(props.fetchDelay);
@@ -82,7 +82,7 @@ export function newReferenceEditorFakeSdk(props) {
82
82
  return Promise.reject({});
83
83
  }
84
84
  },
85
- Space: {
85
+ space: {
86
86
  get: async (params)=>{
87
87
  if (params.spaceId === spaces.indifferent.sys.id) {
88
88
  return spaces.indifferent;
@@ -90,7 +90,7 @@ export function newReferenceEditorFakeSdk(props) {
90
90
  return Promise.reject({});
91
91
  }
92
92
  },
93
- ContentType: {
93
+ contentType: {
94
94
  get: async ({ contentTypeId })=>{
95
95
  if (contentTypeId === contentTypes.published.sys.id) {
96
96
  return contentTypes.published;
@@ -101,7 +101,7 @@ export function newReferenceEditorFakeSdk(props) {
101
101
  Locale: {
102
102
  getMany: async ()=>localesFixtures.list
103
103
  }
104
- }),
104
+ },
105
105
  space: {
106
106
  ...space,
107
107
  getCachedContentTypes () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-markdown",
3
- "version": "1.11.6",
3
+ "version": "1.12.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -39,7 +39,7 @@
39
39
  "@contentful/f36-components": "^5.4.1",
40
40
  "@contentful/f36-icons": "^5.4.1",
41
41
  "@contentful/f36-tokens": "^5.1.0",
42
- "@contentful/field-editor-shared": "^2.12.3",
42
+ "@contentful/field-editor-shared": "^2.13.0",
43
43
  "@types/codemirror": "0.0.109",
44
44
  "codemirror": "^5.65.11",
45
45
  "constate": "^3.3.2",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "registry": "https://npm.pkg.github.com/"
66
66
  },
67
- "gitHead": "72fc78dc2c8b5431b6740852965a1ce3ccb4c997"
67
+ "gitHead": "6bae62839ecfbd1945a60050b51eba95a2594388"
68
68
  }