@miragon/dmn-modeler 0.3.1 → 0.5.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.
package/dist/index.d.ts CHANGED
@@ -46,7 +46,8 @@ export declare interface DmnModelerHandle {
46
46
  isCanvasFocused(): boolean;
47
47
  /**
48
48
  * Switch the colour theme live. Toggles this instance's `data-dmn-theme`
49
- * attribute and mirrors it to a legacy `#theme-link` when present.
49
+ * attribute and mirrors it to a legacy `#theme-link` when present. A no-op
50
+ * once the instance is destroyed.
50
51
  */
51
52
  setTheme(theme: DmnThemeMode): void;
52
53
  /**
@@ -57,7 +58,11 @@ export declare interface DmnModelerHandle {
57
58
  * re-import; the DRD viewbox is preserved.
58
59
  */
59
60
  setLocale(locale: string): Promise<void>;
60
- /** Tear down this instance and all of its listeners and observers. */
61
+ /**
62
+ * Tear down this instance and all of its listeners and observers. Idempotent.
63
+ * Afterwards every other member except the no-op `setTheme` throws
64
+ * `NoModelerError` (async members reject with it).
65
+ */
61
66
  destroy(): void;
62
67
  /**
63
68
  * Unstable escape hatch into the active dmn-js viewer's DI graph. The
@@ -113,6 +118,8 @@ export declare interface DmnOperationResult {
113
118
  readonly warnings: DmnWarning[];
114
119
  }
115
120
 
121
+ /* Excluded from this release type: DmnPendingInputHandle */
122
+
116
123
  /**
117
124
  * Theme selection for a single instance. The modeler toggles a
118
125
  * `data-dmn-theme` attribute on its container + panel parent (the authoritative
@@ -163,6 +170,12 @@ export declare interface DmnWarningError {
163
170
  readonly stack?: string;
164
171
  }
165
172
 
173
+ export declare class NoModelerError extends Error {
174
+ constructor() {
175
+ super("Modeler is not initialized!");
176
+ }
177
+ }
178
+
166
179
  export { }
167
180
 
168
181
  declare module "diagram-js/lib/core/EventBus" {