cedar-embeddable-editor 2.0.2 → 2.0.4
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 +47 -0
- package/bundle-manifest.json +2 -2
- package/cedar-embeddable-editor.d.ts +35 -10
- package/cedar-embeddable-editor.js +48 -48
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.0.4] - 2026-09-01
|
|
11
|
+
|
|
12
|
+
This release aligns CEE's build-time model dependency with the public
|
|
13
|
+
`cedar-model-typescript-library@1.0.5` package. The model library remains compiled into CEE's
|
|
14
|
+
browser bundle and is not a runtime dependency for embedding applications.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- The application and visual-test dependency graphs now pin the same public
|
|
19
|
+
`cedar-model-typescript-library@1.0.5` tarball from npmjs.
|
|
20
|
+
|
|
21
|
+
- A template may be replaced while no instance has been supplied. Set-once exists
|
|
22
|
+
to refuse one question — what becomes of the answers someone has been typing when
|
|
23
|
+
the template under them is swapped — and where there are no answers, there is
|
|
24
|
+
nothing to lose. Each replacement builds a fresh context, so nothing of the
|
|
25
|
+
previous template survives into the new form; once an instance is loaded the
|
|
26
|
+
template is fixed again and a second assignment is reported and ignored, as
|
|
27
|
+
before. A host showing a live view of a template that is itself being edited no
|
|
28
|
+
longer has to discard the element and start a whole editor per change, which cost
|
|
29
|
+
about a second of bootstrapping regardless of the size of the template.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- The editor says it is the editor. `CEE` is stamped under the mark in the form's
|
|
34
|
+
header, above the version, which on its own read `2.0.4-dev.20260827.…` and named
|
|
35
|
+
a build without naming what was built. It matters where CEE is one of several
|
|
36
|
+
CEDAR components on a page: the embeddable designer's preview panel puts CEE's
|
|
37
|
+
header a few inches from the designer's own.
|
|
38
|
+
|
|
39
|
+
- `showExpandCollapseAll`, a config key hiding the Expand All and Collapse All
|
|
40
|
+
buttons above the form. On by default, so nothing changes for a host that does
|
|
41
|
+
not set it. A host rendering its own view of the same artifact beside the form
|
|
42
|
+
— the CEDAR Embeddable Designer previewing the template it is editing — can turn
|
|
43
|
+
them off rather than offering two contradictory sets of controls over one thing.
|
|
44
|
+
Each section still opens and closes on its own header.
|
|
45
|
+
|
|
46
|
+
## [2.0.3] - 2026-08-27
|
|
47
|
+
|
|
48
|
+
This release aligns CEE's build-time model dependency with the public
|
|
49
|
+
`cedar-model-typescript-library@1.0.4` package. The model library remains compiled into CEE's
|
|
50
|
+
browser bundle and is not a runtime dependency for embedding applications.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- The application and visual-test dependency graphs now pin the same public
|
|
55
|
+
`cedar-model-typescript-library@1.0.4` tarball from npmjs.
|
|
56
|
+
|
|
10
57
|
## [2.0.2] - 2026-08-27
|
|
11
58
|
|
|
12
59
|
The second stable release on the 2.x line adds field identities to required-value validation and
|
package/bundle-manifest.json
CHANGED
|
@@ -6,12 +6,15 @@
|
|
|
6
6
|
* `tsc --emitDeclarationOnly` turn this one file into the `.d.ts` the npm package
|
|
7
7
|
* ships, without dragging in paths that exist only inside this repository.
|
|
8
8
|
*
|
|
9
|
-
* Configuration
|
|
10
|
-
* and
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
9
|
+
* Configuration is set-once: the first assignment stands, and a later one is reported
|
|
10
|
+
* and ignored. So is the instance, and so is the template once an instance is loaded
|
|
11
|
+
* against it. That replaces three behaviours which had no answer — a second `config`
|
|
12
|
+
* that patched some keys and replaced others, a read-only mode that could be turned on
|
|
13
|
+
* and not off, and three artifact inputs with no stated precedence.
|
|
14
|
+
*
|
|
15
|
+
* A template with no instance behind it may be replaced, because the question set-once
|
|
16
|
+
* exists to refuse is what becomes of the answers someone has been typing. Where there
|
|
17
|
+
* are none, a host may drive a live view of a template that is itself changing. `eventHandler` is deliberately outside it and may be
|
|
15
18
|
* replaced, for the reasons given where it is declared.
|
|
16
19
|
*
|
|
17
20
|
* Types only, with no runtime values, and that is a constraint rather than a
|
|
@@ -67,6 +70,19 @@ export interface CeeConfig {
|
|
|
67
70
|
* asks. Nothing is rendered under the form either way.
|
|
68
71
|
*/
|
|
69
72
|
showDownloadMenu?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Offers the Expand All and Collapse All buttons above the form.
|
|
75
|
+
*
|
|
76
|
+
* On by default, which is how CEE has always rendered. A host with its own view
|
|
77
|
+
* of the same artifact beside the form — a designer previewing the template it
|
|
78
|
+
* is editing, say — can turn them off so the two are not offered contradictory
|
|
79
|
+
* controls over one thing.
|
|
80
|
+
*
|
|
81
|
+
* The buttons act on the form's own sections and nothing else, so turning them
|
|
82
|
+
* off removes a control rather than fixing the sections open or shut: each
|
|
83
|
+
* still opens and closes on its own header.
|
|
84
|
+
*/
|
|
85
|
+
showExpandCollapseAll?: boolean;
|
|
70
86
|
/**
|
|
71
87
|
* Base for controlled-term search. Must end in a slash.
|
|
72
88
|
*
|
|
@@ -234,9 +250,10 @@ export interface CeeEventHandler {
|
|
|
234
250
|
/**
|
|
235
251
|
* The custom element, as a host sees it.
|
|
236
252
|
*
|
|
237
|
-
* Registered as `cedar-embeddable-editor`. Configuration
|
|
238
|
-
*
|
|
239
|
-
* ignored, and the first accepted value stands.
|
|
253
|
+
* Registered as `cedar-embeddable-editor`. Configuration takes one assignment, as does
|
|
254
|
+
* the instance, and so does the template once an instance is loaded against it; a second
|
|
255
|
+
* is reported through the event handler and ignored, and the first accepted value stands.
|
|
256
|
+
* A template with no instance behind it may be replaced. An unreadable instance is reported
|
|
240
257
|
* and does not spend its assignment, so the host may correct it. An artifact is a
|
|
241
258
|
* template and optionally an instance, so `templateAndInstanceObject` supplies
|
|
242
259
|
* between them what the two separate inputs do and cannot be combined with either.
|
|
@@ -256,7 +273,15 @@ export interface CedarEmbeddableEditorElement extends HTMLElement {
|
|
|
256
273
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
257
274
|
/** Configuration. Assign once, before or after the artifact. */
|
|
258
275
|
config: CeeConfig;
|
|
259
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* The template to render, as a parsed CEDAR artifact.
|
|
278
|
+
*
|
|
279
|
+
* Assignable more than once while no instance has been supplied: each one replaces the
|
|
280
|
+
* form, building a fresh context, so nothing of the previous template survives. Once an
|
|
281
|
+
* instance is loaded the template is fixed, and a further assignment is reported and
|
|
282
|
+
* ignored — the answers in front of a person were recorded against the template that
|
|
283
|
+
* would be taken away.
|
|
284
|
+
*/
|
|
260
285
|
templateObject: CeeJsonObject;
|
|
261
286
|
/**
|
|
262
287
|
* An existing instance to load into the form.
|