contentful-ui-extensions-sdk 4.68.1 → 4.69.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.
|
@@ -180,12 +180,17 @@ export interface ExperienceSelectionAPI {
|
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
182
182
|
* Editable metadata carried by an experience or fragment: taxonomy `tags` and `concepts`,
|
|
183
|
-
* plus
|
|
183
|
+
* plus a `name`. `tags` and `concepts` are classic `Link`s (`sys.type: 'Link'`),
|
|
184
184
|
* distinct from the `ResourceLink`s used elsewhere in this surface.
|
|
185
185
|
*/
|
|
186
186
|
export interface ExperienceMetadata {
|
|
187
187
|
tags?: Link<'Tag', 'Link'>[];
|
|
188
188
|
concepts?: Link<'TaxonomyConcept', 'Link'>[];
|
|
189
|
+
/**
|
|
190
|
+
* Display name of the *optimization variant*, not of the entity — it is only populated for
|
|
191
|
+
* variant entities and is `undefined` on a base experience or fragment. For the entity's own
|
|
192
|
+
* display name read {@link ExperienceSnapshot}'s top-level `name`.
|
|
193
|
+
*/
|
|
189
194
|
name?: string;
|
|
190
195
|
}
|
|
191
196
|
/**
|
|
@@ -196,6 +201,11 @@ export interface ExperienceMetadata {
|
|
|
196
201
|
* `Fragment` and `ExperienceFragment` are the same entity in legacy vs canonical shape; both are
|
|
197
202
|
* accepted so apps stay forward-compatible across the ExO data-model transition. The `Experience`
|
|
198
203
|
* arm carries an optional `template`/`experienceTemplate` (an experience may be un-templated).
|
|
204
|
+
*
|
|
205
|
+
* Every arm carries the entity's display `name`. It is optional because the host populates it and
|
|
206
|
+
* hosts version independently of apps: a host predating this field sends none, and the initial
|
|
207
|
+
* snapshot is a placeholder until the first `exo.experienceChanged` arrives. Do not confuse it with
|
|
208
|
+
* {@link ExperienceMetadata.name}, which is the optimization variant's name.
|
|
199
209
|
*/
|
|
200
210
|
export type ExperienceSnapshot = {
|
|
201
211
|
sys: {
|
|
@@ -205,6 +215,8 @@ export type ExperienceSnapshot = {
|
|
|
205
215
|
template?: ResourceLink<'Contentful:Template'>;
|
|
206
216
|
experienceTemplate?: ResourceLink<'Contentful:ExperienceTemplate'>;
|
|
207
217
|
};
|
|
218
|
+
/** Display name of the entity being edited, as shown in the experience editor. */
|
|
219
|
+
name?: string;
|
|
208
220
|
metadata?: ExperienceMetadata;
|
|
209
221
|
} | {
|
|
210
222
|
sys: {
|
|
@@ -213,6 +225,8 @@ export type ExperienceSnapshot = {
|
|
|
213
225
|
version: number;
|
|
214
226
|
componentType: ResourceLink<'Contentful:ComponentType'>;
|
|
215
227
|
};
|
|
228
|
+
/** Display name of the entity being edited, as shown in the experience editor. */
|
|
229
|
+
name?: string;
|
|
216
230
|
metadata?: ExperienceMetadata;
|
|
217
231
|
} | {
|
|
218
232
|
sys: {
|
|
@@ -221,6 +235,8 @@ export type ExperienceSnapshot = {
|
|
|
221
235
|
version: number;
|
|
222
236
|
component: ResourceLink<'Contentful:Component'>;
|
|
223
237
|
};
|
|
238
|
+
/** Display name of the entity being edited, as shown in the experience editor. */
|
|
239
|
+
name?: string;
|
|
224
240
|
metadata?: ExperienceMetadata;
|
|
225
241
|
};
|
|
226
242
|
export interface ExperienceAPI {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"contentful-ui-extensions-sdk","description":"A JavaScript library to develop custom apps for Contentful","version":"4.
|
|
1
|
+
{"name":"contentful-ui-extensions-sdk","description":"A JavaScript library to develop custom apps for Contentful","version":"4.69.0","author":"Contentful GmbH","license":"MIT","sideEffects":true,"repository":{"url":"https://github.com/contentful/ui-extensions-sdk.git","type":"git"},"homepage":"https://www.contentful.com/developers/docs/extensibility/app-framework/sdk/","main":"dist/cf-extension-api.js","unpkg":"dist/cf-extension-api.bundled.js","jsdelivr":"dist/cf-extension-api.bundled.js","types":"dist/index.d.ts","files":["dist/cf-extension-api.js","dist/cf-extension-api.js.map","dist/cf-extension-api.bundled.js","dist/cf-extension.css","dist/**/*.d.ts"],"scripts":{"test":"ts-mocha -p tsconfig.test.json 'test/unit/*.[jt]s' --reporter mocha-multi-reporters --reporter-options configFile=mocha.unit-reporters.json","lint":"eslint '{lib,test}/**/*.{t,j}s'","lint:fix":"npm run lint -- --fix","build":"npm run check-types && rollup -c --compact","build:debug":"npm run build -- --sourcemap","prepublishOnly":"npm run build","size":"echo \"Gzipped, estimate: $(gzip -9 -c dist/cf-extension-api.js | wc -c) bytes\"","semantic-release":"semantic-release","publish-all":"node ./scripts/publish.js","verify":"node ./scripts/verify.js","check-types":"tsc --noEmit -m commonjs","prepare":"husky","lint-staged":"lint-staged"},"dependencies":{"contentful-management":"^12.3.1"},"devDependencies":{"@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-node-resolve":"^16.0.0","@semantic-release/changelog":"6.0.3","@semantic-release/exec":"7.1.0","@semantic-release/git":"10.0.1","@testing-library/dom":"10.4.1","@types/chai-as-promised":"8.0.2","@types/cross-spawn":"6.0.6","@types/fs-extra":"11.0.4","@types/jsdom":"30.0.0","@types/mocha":"10.0.10","@types/nanoid":"3.0.0","@types/sinon":"^22.0.0","@types/sinon-chai":"^3.2.5","@typescript-eslint/eslint-plugin":"7.18.0","@typescript-eslint/parser":"7.18.0","babel-eslint":"10.1.0","chai":"4.5.0","chai-as-promised":"8.0.2","cross-spawn":"7.0.6","eslint":"8.57.1","eslint-config-prettier":"10.1.8","eslint-config-standard":"17.1.0","eslint-plugin-import":"2.32.0","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"5.5.6","eslint-plugin-promise":"6.6.0","eslint-plugin-react":"7.37.5","eslint-plugin-standard":"5.0.0","fs-extra":"11.3.5","husky":"9.1.7","jsdom":"30.0.1","lint-staged":"17.0.8","mocha":"11.7.6","mocha-junit-reporter":"2.2.1","mocha-multi-reporters":"1.5.1","mochawesome":"8.0.1","mochawesome-merge":"5.1.1","mochawesome-report-generator":"6.3.2","prettier":"3.8.4","rollup":"2.80.0","rollup-plugin-terser":"7.0.2","rollup-plugin-typescript2":"0.37.0","semantic-release":"^25.0.2","sinon":"22.0.0","sinon-chai":"3.7.0","ts-mocha":"11.1.0","tslib":"2.8.1","typescript":"5.9.3"},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"*.md":["prettier --write"]},"release":{"branches":["main",{"name":"canary","channel":"canary","prerelease":"alpha"}],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog",["@semantic-release/npm",{"npmPublish":false}],["@semantic-release/exec",{"verifyConditionsCmd":"node ./scripts/verify.js","publishCmd":"npm run publish-all"}],["@semantic-release/git",{"message":"chore: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}","assets":["CHANGELOG.md","package.json","package-lock.json"]}],"@semantic-release/github"]}}
|