reactronic 0.24.271 → 0.24.273

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.
@@ -55,11 +55,11 @@ export declare abstract class RxNode<E = unknown> {
55
55
  static setDefaultLoggingOptions(logging?: LoggingOptions): void;
56
56
  }
57
57
  export type RxNodeDecl<E = unknown> = {
58
- onChange?: Delegate<E>;
58
+ script?: Delegate<E>;
59
59
  key?: string;
60
60
  mode?: Mode;
61
- onCreate?: Delegate<E>;
62
- onDestroy?: Delegate<E>;
61
+ creation?: Delegate<E>;
62
+ destruction?: Delegate<E>;
63
63
  triggers?: unknown;
64
64
  preset?: RxNodeDecl<E>;
65
65
  };
@@ -161,7 +161,7 @@ export class BaseDriver {
161
161
  mount(node) {
162
162
  }
163
163
  update(node) {
164
- invokeOnChangeViaPresetChain(node.element, node.declaration);
164
+ invokeScriptViaPresetChain(node.element, node.declaration);
165
165
  }
166
166
  child(ownerNode, childDriver, childDeclaration, childPreset) {
167
167
  return undefined;
@@ -197,25 +197,25 @@ function getModeViaPresetChain(declaration) {
197
197
  }
198
198
  function invokeOnCreateViaPresetChain(element, declaration) {
199
199
  const preset = declaration.preset;
200
- const onCreate = declaration.onCreate;
201
- if (onCreate)
202
- onCreate(element, preset ? () => invokeOnCreateViaPresetChain(element, preset) : NOP);
200
+ const creation = declaration.creation;
201
+ if (creation)
202
+ creation(element, preset ? () => invokeOnCreateViaPresetChain(element, preset) : NOP);
203
203
  else if (preset)
204
204
  invokeOnCreateViaPresetChain(element, preset);
205
205
  }
206
- function invokeOnChangeViaPresetChain(element, declaration) {
206
+ function invokeScriptViaPresetChain(element, declaration) {
207
207
  const preset = declaration.preset;
208
- const onChange = declaration.onChange;
209
- if (onChange)
210
- onChange(element, preset ? () => invokeOnChangeViaPresetChain(element, preset) : NOP);
208
+ const script = declaration.script;
209
+ if (script)
210
+ script(element, preset ? () => invokeScriptViaPresetChain(element, preset) : NOP);
211
211
  else if (preset)
212
- invokeOnChangeViaPresetChain(element, preset);
212
+ invokeScriptViaPresetChain(element, preset);
213
213
  }
214
214
  function invokeOnDestroyViaPresetChain(element, declaration) {
215
215
  const preset = declaration.preset;
216
- const onDestroy = declaration.onDestroy;
217
- if (onDestroy)
218
- onDestroy(element, preset ? () => invokeOnDestroyViaPresetChain(element, preset) : NOP);
216
+ const destruction = declaration.destruction;
217
+ if (destruction)
218
+ destruction(element, preset ? () => invokeOnDestroyViaPresetChain(element, preset) : NOP);
219
219
  else if (preset)
220
220
  invokeOnDestroyViaPresetChain(element, preset);
221
221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactronic",
3
- "version": "0.24.271",
3
+ "version": "0.24.273",
4
4
  "description": "Reactronic - Transactional Reactive State Management",
5
5
  "publisher": "Nezaboodka Software",
6
6
  "license": "Apache-2.0",