cedar-embeddable-editor 2.0.29 → 2.0.30
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 +8 -0
- package/README.md +8 -0
- package/bundle-manifest.host-fonts.json +3 -2
- package/bundle-manifest.json +3 -2
- package/cedar-embeddable-editor.d.ts +16 -6
- package/cedar-embeddable-editor.host-fonts.js +184 -185
- package/cedar-embeddable-editor.js +184 -186
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.30] - 2026-10-27
|
|
9
|
+
|
|
10
|
+
Aligns with `cedar-model-typescript-library@1.0.25`.
|
|
11
|
+
|
|
12
|
+
- Adds a `required` setting to the field element's configuration. The aligned model library no longer lets a field written on its own state a requirement, so a host that places the field as required now says so in this setting.
|
|
13
|
+
- Keeps a host page's Material theme from restyling the editor, by binding every Material token CEE reads on its own shadow host.
|
|
14
|
+
- Registers the embedded fonts once in the document head rather than in every shadow root, and compiles the shadow-root stylesheet once rather than into both elements. The production bundle no longer carries the developer app, lodash or the whole `package.json`, and its manifest records the version the bundle reports as `reportedVersion`.
|
|
15
|
+
|
|
8
16
|
## [2.0.29] - 2026-10-26
|
|
9
17
|
|
|
10
18
|
Aligns with `cedar-model-typescript-library@1.0.24`.
|
package/README.md
CHANGED
|
@@ -220,6 +220,14 @@ CEF then states the type above the description, with the icon its header would h
|
|
|
220
220
|
drawn (for example, `Paragraph`). A host whose header already shows the type, as CED's
|
|
221
221
|
field cards do, leaves it unset.
|
|
222
222
|
|
|
223
|
+
A field written on its own is not required, because only a template or an element
|
|
224
|
+
requires the field it places. A host that places the field as required sets
|
|
225
|
+
`required: true`. CEF then marks the field as CEE marks a required one, and reports an
|
|
226
|
+
empty value as missing unless `suppressEmptyFieldErrors` is set. Like every key, it
|
|
227
|
+
takes one assignment, so a change of requirement takes a new element. CEF refuses an
|
|
228
|
+
artifact that states a requirement or a recommendation itself, as both CEDAR model
|
|
229
|
+
libraries do.
|
|
230
|
+
|
|
223
231
|
Read-only controls have no placeholder text, and fields without constraints draw empty
|
|
224
232
|
boxes. Static fields show their content. A standalone page break is described without
|
|
225
233
|
creating pagination.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"main.js",
|
|
5
5
|
"polyfills.js"
|
|
6
6
|
],
|
|
7
|
-
"bytes":
|
|
8
|
-
"sha256": "
|
|
7
|
+
"bytes": 2236112,
|
|
8
|
+
"sha256": "3595bcec8380948ece0f2b9d529f265e3be55363f629f9caf556fe63dfdb949e",
|
|
9
|
+
"reportedVersion": "2.0.30"
|
|
9
10
|
}
|
package/bundle-manifest.json
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"main.js",
|
|
5
5
|
"polyfills.js"
|
|
6
6
|
],
|
|
7
|
-
"bytes":
|
|
8
|
-
"sha256": "
|
|
7
|
+
"bytes": 2358766,
|
|
8
|
+
"sha256": "87ec2da47f8efa70bd7d8b7fa8d05a8126ac807a21f878fd098607b0284ce3d6",
|
|
9
|
+
"reportedVersion": "2.0.30"
|
|
9
10
|
}
|
|
@@ -55,6 +55,15 @@ export interface CeeConfig {
|
|
|
55
55
|
showFieldType?: boolean;
|
|
56
56
|
/** Keep empty trial fields quiet without changing validity or nonempty-value errors. */
|
|
57
57
|
suppressEmptyFieldErrors?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* For CEF: whether the field is required where the host places it.
|
|
60
|
+
*
|
|
61
|
+
* A field written on its own is not required, because only a template or an element requires the
|
|
62
|
+
* field it places. A host placing the field in a form of its own says so here. CEF then marks the
|
|
63
|
+
* field as CEE marks a required one, and reports an empty value as missing unless
|
|
64
|
+
* `suppressEmptyFieldErrors` is set. CEE reads its fields' requirements from the template.
|
|
65
|
+
*/
|
|
66
|
+
required?: boolean;
|
|
58
67
|
/**
|
|
59
68
|
* Renders the form without editing controls.
|
|
60
69
|
*
|
|
@@ -540,7 +549,7 @@ export interface CedarEmbeddableFieldChangeDetail {
|
|
|
540
549
|
* description — settle what an editor draws around a whole form. Field labels and
|
|
541
550
|
* descriptions belong to this element in read-only mode.
|
|
542
551
|
*/
|
|
543
|
-
export type CedarEmbeddableFieldConfig = Pick<CeeConfig, 'readOnlyMode' | 'previewMode' | 'showFieldType' | 'suppressEmptyFieldErrors' | 'trustTemplateRichText' | 'terminologyBaseUrl' | 'bridgeBaseUrl' | 'defaultLanguage' | 'fallbackLanguage' | 'languageMapPathPrefix'>;
|
|
552
|
+
export type CedarEmbeddableFieldConfig = Pick<CeeConfig, 'readOnlyMode' | 'previewMode' | 'showFieldType' | 'suppressEmptyFieldErrors' | 'required' | 'trustTemplateRichText' | 'terminologyBaseUrl' | 'bridgeBaseUrl' | 'defaultLanguage' | 'fallbackLanguage' | 'languageMapPathPrefix'>;
|
|
544
553
|
/**
|
|
545
554
|
* One field's control, as a host sees it.
|
|
546
555
|
*
|
|
@@ -552,11 +561,12 @@ export type CedarEmbeddableFieldConfig = Pick<CeeConfig, 'readOnlyMode' | 'previ
|
|
|
552
561
|
* value remains visible and cannot be edited. Static content is also described;
|
|
553
562
|
* a standalone page break has a label and type but does not create pagination.
|
|
554
563
|
*
|
|
555
|
-
* Cardinality
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
*
|
|
564
|
+
* Cardinality and requirement belong to a field's placement in a template, and a field
|
|
565
|
+
* written on its own states neither, so the value this element acquires is single. A
|
|
566
|
+
* host that places the field as required says so with the `required` configuration
|
|
567
|
+
* key. Like the rest of the configuration it takes one assignment, so a change of
|
|
568
|
+
* requirement takes a new element. An artifact that states a requirement or a
|
|
569
|
+
* recommendation itself is refused, as both CEDAR model libraries refuse one.
|
|
560
570
|
*/
|
|
561
571
|
export interface CedarEmbeddableFieldElement extends HTMLElement {
|
|
562
572
|
/** Typed value event; the inherited overloads still handle every other DOM event. */
|