@ethlete/contentful 4.0.0-next.6 → 4.0.0-next.7
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/CHANGELOG.md +27 -0
- package/README.md +23 -4
- package/fesm2022/ethlete-contentful.mjs +477 -481
- package/fesm2022/ethlete-contentful.mjs.map +1 -1
- package/generators/generators.json +9 -0
- package/generators/migrate-to-contentful-v5/migration-scope.js +35 -0
- package/generators/migrate-to-contentful-v5/migration.js +192 -0
- package/generators/migrate-to-contentful-v5/schema.json +26 -0
- package/package.json +20 -10
- package/types/ethlete-contentful.d.ts +93 -194
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @ethlete/contentful
|
|
2
2
|
|
|
3
|
+
## 4.0.0-next.7
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#3041](https://github.com/ethlete-io/ethdk/pull/3041) [`9c71ed3`](https://github.com/ethlete-io/ethdk/commit/9c71ed3c7d1bd92b58e9a183a3213f3439986844) Thanks [@github-actions](https://github.com/apps/github-actions)! - The built-in embedded components now only exist when `provideContentfulConfig()` is in scope - without it embedded assets are skipped and hyperlinks render as plain `<a href>`. Apps that render embedded content must add the provider (no arguments is enough). In exchange, `ContentfulLinkComponent` and text-only rich text no longer bundle the image/video/audio/file components.
|
|
8
|
+
|
|
9
|
+
- [#3041](https://github.com/ethlete-io/ethdk/pull/3041) [`9c71ed3`](https://github.com/ethlete-io/ethdk/commit/9c71ed3c7d1bd92b58e9a183a3213f3439986844) Thanks [@github-actions](https://github.com/apps/github-actions)! - Rich text: marks now render as semantic elements (`<strong>`, `<em>`, `<u>`, `<code>`, `<s>`, `<sub>`, `<sup>`) instead of Tailwind classes; marks inside hyperlinks become `et-contentful-rich-text-mark-*` classes on the link's `textClass`. `marksToClass` changed accordingly, `marksToTags` is new.
|
|
10
|
+
|
|
11
|
+
- [#3041](https://github.com/ethlete-io/ethdk/pull/3041) [`0817cc8`](https://github.com/ethlete-io/ethdk/commit/0817cc888a4cb5e981437096bf7df5351a4c5de6) Thanks [@github-actions](https://github.com/apps/github-actions)! - Contentful v5: the package peers on `@ethlete/components` instead of `@ethlete/cdk` (and drops
|
|
12
|
+
`@angular/cdk` and `rxjs`). `et-contentful-image` renames `hasPriority` to `priority` and loses its
|
|
13
|
+
`*Class` inputs - style the static `et-picture-*` classes instead. The rich text renderer now diffs
|
|
14
|
+
keyed, so element DOM and embedded component instances survive updates and reorders; the
|
|
15
|
+
`useTailwindClasses` option is gone. Run `nx g @ethlete/contentful:migrate-to-contentful-v5`.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#3041](https://github.com/ethlete-io/ethdk/pull/3041) [`9c71ed3`](https://github.com/ethlete-io/ethdk/commit/9c71ed3c7d1bd92b58e9a183a3213f3439986844) Thanks [@github-actions](https://github.com/apps/github-actions)! - Smaller bundles: the rich-text renderer no longer pulls the `@contentful/rich-text-types` runtime enums (~2.4 kB gz), and the renderer error codes plus `GQL_FRAGMENT_CONTENTFUL_ASSET` are now droppable literals. `@contentful/rich-text-types` stays a peer dependency for its types.
|
|
20
|
+
|
|
21
|
+
- [#3041](https://github.com/ethlete-io/ethdk/pull/3041) [`353777b`](https://github.com/ethlete-io/ethdk/commit/353777bb56e42ad1c02058a2ccf694f69c94b025) Thanks [@github-actions](https://github.com/apps/github-actions)! - Mark build-tooling peer dependencies (`vite`, `typescript`, `ts-morph`, `@nx/devkit`, `@analogjs/*`) and feature-scoped runtime peers (`date-fns` in components) as optional via `peerDependenciesMeta`. They are only needed when running the Nx generators or using the date/time components - consumers no longer have to install them just to use the libraries.
|
|
22
|
+
|
|
23
|
+
- [#3041](https://github.com/ethlete-io/ethdk/pull/3041) [`353777b`](https://github.com/ethlete-io/ethdk/commit/353777bb56e42ad1c02058a2ccf694f69c94b025) Thanks [@github-actions](https://github.com/apps/github-actions)! - Adopt the `@ethlete/eslint-plugin` styleguide flat configs in `core`, `query`, `contentful` and
|
|
24
|
+
`types`, and apply the resulting auto-fixes. Runtime behavior is unchanged; three fixes are visible to
|
|
25
|
+
TypeScript consumers: exported `types` shapes are `type` aliases rather than `interface` declarations
|
|
26
|
+
(so they can no longer be extended by declaration merging), `core`'s `PropsDirective.destroyRef` and
|
|
27
|
+
`SeoDirective.parent` are `private`, and `ConsentHandler` is a `type`. The theme name registries stay
|
|
28
|
+
interfaces so consumers can keep augmenting them.
|
|
29
|
+
|
|
3
30
|
## 4.0.0-next.6
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
# contentful
|
|
1
|
+
# @ethlete/contentful
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Angular components for rendering Contentful content - a diffing rich-text renderer with custom-component support for embedded entries, asset components (image, video, audio, file, link), and typed helpers for the REST and GraphQL APIs.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @ethlete/contentful
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
@Component({
|
|
15
|
+
imports: [ContentfulRichTextRendererComponent],
|
|
16
|
+
providers: [provideContentfulConfig({ customComponents: { newsElement: NewsElementComponent } })],
|
|
17
|
+
template: `<et-contentful-rich-text-renderer [content]="data()" richTextPath="items[0].fields.html" />`,
|
|
18
|
+
})
|
|
19
|
+
export class NewsArticleComponent {}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Documentation
|
|
23
|
+
|
|
24
|
+
Full guide (rich-text rendering, custom components, asset components, config, GQL helpers) on the docs site:
|
|
25
|
+
|
|
26
|
+
- [Overview & usage](https://ethlete-sdk-docs.web.app/contentful/)
|