@apollohg/react-native-rich-text-editor 2.0.0 → 2.0.1

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.
Files changed (161) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +1 -1
  3. package/android/build.gradle +3 -0
  4. package/app.plugin.js +42 -39
  5. package/dist/AtomHost.js +18 -11
  6. package/dist/EditorAddon.js +4 -2
  7. package/dist/EditorAddonNormalization.js +17 -9
  8. package/dist/EditorMentionThemeNormalization.js +6 -3
  9. package/dist/EditorMentionThemeValidation.js +28 -11
  10. package/dist/EditorStyleSheetNormalization.js +84 -37
  11. package/dist/EditorTheme.d.ts +4 -0
  12. package/dist/EditorTheme.js +5 -3
  13. package/dist/EditorToolbarComponent.d.ts +1 -1
  14. package/dist/EditorToolbarComponent.js +1 -1
  15. package/dist/EditorToolbarRegistry.js +5 -5
  16. package/dist/EditorToolbarTypes.d.ts +12 -12
  17. package/dist/EditorToolbarVisuals.js +1 -1
  18. package/dist/ExternalTextComposition.js +89 -43
  19. package/dist/ImageLoadingPolicy.d.ts +1 -1
  20. package/dist/NativeEditorBoundaryError.d.ts +7 -7
  21. package/dist/NativeEditorBoundaryError.js +9 -5
  22. package/dist/NativeEditorCollaborationTransport.d.ts +7 -7
  23. package/dist/NativeEditorCollaborationTransport.js +28 -15
  24. package/dist/NativeEditorCreateConfig.js +11 -6
  25. package/dist/NativeEditorCreateJson.js +51 -25
  26. package/dist/NativeEditorCreateValidation.js +11 -6
  27. package/dist/NativeEditorDocumentBridge.d.ts +1 -1
  28. package/dist/NativeEditorDocumentBridge.js +32 -18
  29. package/dist/NativeEditorDocumentHandle.d.ts +4 -4
  30. package/dist/NativeEditorDocumentHandle.js +1 -1
  31. package/dist/NativeEditorLocalAwareness.js +25 -13
  32. package/dist/NativeEditorNativeModule.d.ts +8 -1
  33. package/dist/NativeEditorNativeModule.js +7 -5
  34. package/dist/NativeEditorRenderNormalization.js +66 -25
  35. package/dist/NativeEditorResultNormalization.js +53 -29
  36. package/dist/NativeEditorTypes.d.ts +10 -10
  37. package/dist/NativeEditorV2Decimal.js +6 -3
  38. package/dist/NativeProseViewer.js +11 -3
  39. package/dist/ResourceLimits.d.ts +2 -2
  40. package/dist/ResourceLimits.js +7 -2
  41. package/dist/RichTextEditor.js +1 -1
  42. package/dist/RichTextEditorNativeTypes.d.ts +1 -1
  43. package/dist/RichTextEditorNativeView.d.ts +1 -3
  44. package/dist/RichTextEditorSerialization.js +24 -14
  45. package/dist/RichTextEditorTypes.d.ts +1 -1
  46. package/dist/YjsCollaboration.d.ts +7 -7
  47. package/dist/YjsCollaboration.js +42 -26
  48. package/dist/addons.d.ts +4 -4
  49. package/dist/addons.js +3 -3
  50. package/dist/atomInstances.js +6 -3
  51. package/dist/atomUpdates.js +7 -4
  52. package/dist/atoms.js +20 -12
  53. package/dist/attributeValidation.js +55 -24
  54. package/dist/contentExpression.js +80 -42
  55. package/dist/listMarkers.d.ts +1 -1
  56. package/dist/listMarkers.js +1 -1
  57. package/dist/schemaDefinition.d.ts +1 -1
  58. package/dist/schemaDefinition.js +23 -14
  59. package/dist/schemaDocument.js +1 -1
  60. package/dist/schemaDocumentConstruction.js +25 -14
  61. package/dist/schemaNormalization.js +51 -29
  62. package/dist/schemaPresets.d.ts +1 -1
  63. package/dist/schemaPresets.js +9 -4
  64. package/dist/schemaResolution.js +46 -25
  65. package/dist/specs/PreparedProseViewerNativeComponent.d.ts +4 -0
  66. package/dist/useEditorToolbarInteractions.d.ts +2 -2
  67. package/dist/useEditorToolbarInteractions.js +45 -23
  68. package/dist/useEditorToolbarItems.d.ts +1 -1
  69. package/dist/useEditorToolbarItems.js +4 -3
  70. package/dist/useEditorToolbarPresentation.d.ts +3 -3
  71. package/dist/useEditorToolbarPresentation.js +4 -4
  72. package/dist/useEditorToolbarState.d.ts +1 -1
  73. package/dist/useEditorToolbarState.js +1 -1
  74. package/dist/useFocusPreservingFrames.js +11 -8
  75. package/dist/useNativeEditor.d.ts +1 -1
  76. package/dist/useNativeEditor.js +21 -11
  77. package/dist/useRichTextEditorCommands.d.ts +2 -2
  78. package/dist/useRichTextEditorCommands.js +59 -29
  79. package/dist/useRichTextEditorEvents.d.ts +3 -3
  80. package/dist/useRichTextEditorEvents.js +75 -32
  81. package/dist/useRichTextEditorMentions.d.ts +4 -4
  82. package/dist/useRichTextEditorMentions.js +48 -29
  83. package/dist/useRichTextEditorPresentation.d.ts +4 -4
  84. package/dist/useRichTextEditorPresentation.js +25 -23
  85. package/dist/useRichTextEditorState.d.ts +3 -3
  86. package/dist/useRichTextEditorState.js +20 -15
  87. package/dist/useRichTextEditorUpdates.d.ts +1 -1
  88. package/dist/useRichTextEditorUpdates.js +99 -41
  89. package/dist/useViewerAtoms.js +63 -36
  90. package/ios/EditorCore.xcframework/Info.plist +5 -5
  91. package/ios/EditorCore.xcframework/ios-arm64/libeditor_core.a +0 -0
  92. package/ios/EditorCore.xcframework/ios-arm64_x86_64-simulator/libeditor_core.a +0 -0
  93. package/package.json +11 -3
  94. package/react-native.config.js +1 -1
  95. package/rust/android/arm64-v8a/libeditor_core.so +0 -0
  96. package/rust/android/armeabi-v7a/libeditor_core.so +0 -0
  97. package/rust/android/x86/libeditor_core.so +0 -0
  98. package/rust/android/x86_64/libeditor_core.so +0 -0
  99. package/src/AtomHost.tsx +58 -28
  100. package/src/EditorAddon.ts +18 -8
  101. package/src/EditorAddonNormalization.ts +40 -11
  102. package/src/EditorMentionThemeNormalization.ts +15 -4
  103. package/src/EditorMentionThemeValidation.ts +51 -14
  104. package/src/EditorStyleSheet.ts +1 -0
  105. package/src/EditorStyleSheetNormalization.ts +195 -64
  106. package/src/EditorTheme.ts +13 -5
  107. package/src/EditorToolbarComponent.tsx +2 -1
  108. package/src/EditorToolbarRegistry.tsx +23 -13
  109. package/src/EditorToolbarTypes.tsx +12 -12
  110. package/src/EditorToolbarVisuals.tsx +6 -3
  111. package/src/EditorUpdateRevision.ts +1 -0
  112. package/src/ExternalTextComposition.ts +259 -49
  113. package/src/ImageLoadingPolicy.ts +3 -1
  114. package/src/NativeEditorBoundaryError.ts +38 -11
  115. package/src/NativeEditorCollaborationTransport.ts +108 -27
  116. package/src/NativeEditorCreateConfig.ts +92 -19
  117. package/src/NativeEditorCreateJson.ts +163 -26
  118. package/src/NativeEditorCreateValidation.ts +33 -12
  119. package/src/NativeEditorDocumentBridge.ts +111 -19
  120. package/src/NativeEditorDocumentHandle.ts +9 -4
  121. package/src/NativeEditorLocalAwareness.ts +70 -15
  122. package/src/NativeEditorNativeModule.ts +13 -9
  123. package/src/NativeEditorRenderNormalization.ts +128 -29
  124. package/src/NativeEditorResultNormalization.ts +143 -32
  125. package/src/NativeEditorTypes.ts +12 -11
  126. package/src/NativeEditorV2Decimal.ts +12 -3
  127. package/src/NativeProseViewer.tsx +46 -16
  128. package/src/ResourceLimits.ts +15 -8
  129. package/src/RichTextEditor.tsx +3 -1
  130. package/src/RichTextEditorNativeTypes.tsx +1 -1
  131. package/src/RichTextEditorNativeView.tsx +2 -8
  132. package/src/RichTextEditorSerialization.tsx +70 -24
  133. package/src/RichTextEditorTypes.tsx +1 -1
  134. package/src/YjsCollaboration.ts +143 -47
  135. package/src/addons.ts +12 -8
  136. package/src/atomInstances.ts +25 -5
  137. package/src/atomUpdates.ts +23 -6
  138. package/src/atoms.ts +85 -18
  139. package/src/attributeValidation.ts +97 -33
  140. package/src/contentExpression.ts +218 -63
  141. package/src/listMarkers.ts +1 -1
  142. package/src/schemaDefinition.ts +82 -20
  143. package/src/schemaDocument.ts +15 -1
  144. package/src/schemaDocumentConstruction.ts +80 -16
  145. package/src/schemaNormalization.ts +155 -41
  146. package/src/schemaPresets.ts +37 -31
  147. package/src/schemaResolution.ts +126 -27
  148. package/src/specs/PreparedProseViewerNativeComponent.ts +4 -2
  149. package/src/useEditorToolbarInteractions.tsx +85 -36
  150. package/src/useEditorToolbarItems.tsx +50 -22
  151. package/src/useEditorToolbarPresentation.tsx +81 -58
  152. package/src/useEditorToolbarState.tsx +8 -6
  153. package/src/useFocusPreservingFrames.ts +43 -15
  154. package/src/useNativeEditor.ts +111 -51
  155. package/src/useRichTextEditorCommands.tsx +127 -54
  156. package/src/useRichTextEditorEvents.tsx +144 -42
  157. package/src/useRichTextEditorMentions.tsx +118 -37
  158. package/src/useRichTextEditorPresentation.tsx +128 -114
  159. package/src/useRichTextEditorState.tsx +76 -40
  160. package/src/useRichTextEditorUpdates.tsx +207 -56
  161. package/src/useViewerAtoms.tsx +162 -66
@@ -16,10 +16,10 @@ import {
16
16
  type EditorToolbarCommand,
17
17
  type EditorToolbarListType,
18
18
  } from './EditorToolbar';
19
- import { useRichTextEditorState } from './useRichTextEditorState';
20
- import { useRichTextEditorMentions } from './useRichTextEditorMentions';
21
- import { useRichTextEditorCommands } from './useRichTextEditorCommands';
22
- import { useRichTextEditorEvents } from './useRichTextEditorEvents';
19
+ import { type useRichTextEditorState } from './useRichTextEditorState';
20
+ import { type useRichTextEditorMentions } from './useRichTextEditorMentions';
21
+ import { type useRichTextEditorCommands } from './useRichTextEditorCommands';
22
+ import { type useRichTextEditorEvents } from './useRichTextEditorEvents';
23
23
  import {
24
24
  useSerializedValue,
25
25
  serializeRemoteSelections,
@@ -185,27 +185,24 @@ export function useRichTextEditorPresentation(
185
185
 
186
186
  const themeJson = useMemo(
187
187
  () => serializeEditorTheme(theme, mentionSuggestionTheme),
188
- [mentionSuggestionTheme, theme]
188
+ [ mentionSuggestionTheme, theme ]
189
189
  );
190
190
 
191
- const addonsJson = useSerializedValue(addons, (value) =>
192
- serializeNormalizedEditorAddons(value)
193
- );
191
+ const addonsJson = useSerializedValue(addons, value =>
192
+ serializeNormalizedEditorAddons(value));
194
193
 
195
- const imageLoadingPolicyJson = useSerializedValue(imageLoadingPolicy, (value) =>
196
- serializeEditorImageLoadingPolicy(value)
197
- );
194
+ const imageLoadingPolicyJson = useSerializedValue(imageLoadingPolicy, value =>
195
+ serializeEditorImageLoadingPolicy(value));
198
196
 
199
- const androidInputOptionsJson = useSerializedValue(androidInputOptions, (value) =>
200
- JSON.stringify(value)
201
- );
197
+ const androidInputOptionsJson = useSerializedValue(androidInputOptions, value =>
198
+ JSON.stringify(value));
202
199
 
203
- const remoteSelectionsJson = useSerializedValue(remoteSelections, (selections) =>
204
- serializeRemoteSelections(selections)
205
- );
200
+ const remoteSelectionsJson = useSerializedValue(remoteSelections, selections =>
201
+ serializeRemoteSelections(selections));
206
202
 
207
203
  const atomsJson = useMemo(() => {
208
204
  const supplied = serializeEditorAtoms(atoms);
205
+
209
206
  const serialized =
210
207
  supplied == null
211
208
  ? { nodeTypes: [] as string[], estimatedHeights: {} as Record<string, number> }
@@ -213,20 +210,26 @@ export function useRichTextEditorPresentation(
213
210
  nodeTypes: string[];
214
211
  estimatedHeights: Record<string, number>;
215
212
  });
213
+
216
214
  for (const instance of atomState.instances) {
217
215
  if (
218
216
  Object.prototype.hasOwnProperty.call(serialized.estimatedHeights, instance.nodeType)
219
217
  ) {
220
218
  continue;
221
219
  }
220
+
222
221
  serialized.nodeTypes.push(instance.nodeType);
223
222
  serialized.estimatedHeights[instance.nodeType] = DEFAULT_ATOM_CHIP_HEIGHT;
224
223
  }
224
+
225
225
  return serialized.nodeTypes.length === 0 ? undefined : JSON.stringify(serialized);
226
- }, [atomState.instances, atoms]);
226
+ }, [ atomState.instances, atoms ]);
227
227
 
228
228
  useEffect(() => {
229
- if (!__DEV__) return;
229
+ if (!__DEV__) {
230
+ return;
231
+ }
232
+
230
233
  for (const instance of atomState.instances) {
231
234
  if (
232
235
  atomComponents.has(instance.nodeType) ||
@@ -234,12 +237,14 @@ export function useRichTextEditorPresentation(
234
237
  ) {
235
238
  continue;
236
239
  }
240
+
237
241
  warnedUnknownAtomTypesRef.current.add(instance.nodeType);
242
+
238
243
  console.warn(
239
244
  `NativeRichTextEditor: rendering unknown atom type '${instance.nodeType}' as a chip`
240
245
  );
241
246
  }
242
- }, [atomComponents, atomState.instances]);
247
+ }, [ atomComponents, atomState.instances, warnedUnknownAtomTypesRef ]);
243
248
 
244
249
  const runAtomActionRef = useRef(runAtomAction);
245
250
 
@@ -261,10 +266,12 @@ export function useRichTextEditorPresentation(
261
266
  documentVersion: string | null,
262
267
  attrs: AtomAttrsUpdate
263
268
  ) => {
264
- if (owner !== atomOwnerRef.current)
269
+ if (owner !== atomOwnerRef.current) {
265
270
  return Promise.reject(
266
271
  new AtomUpdateAttrsError('not-ready', 'The editor has rebound.')
267
272
  );
273
+ }
274
+
268
275
  return updateAtomAttrsRef.current(
269
276
  instance.key,
270
277
  instance.nodeType,
@@ -274,114 +281,115 @@ export function useRichTextEditorPresentation(
274
281
  attrs
275
282
  );
276
283
  },
277
- []
284
+ [ atomOwnerRef ]
278
285
  );
279
286
 
280
287
  const atomChildren = useMemo(
281
288
  () =>
282
289
  atomContentWidth == null
283
290
  ? null
284
- : atomState.instances.map((instance) => {
285
- const Component = atomComponents.get(instance.nodeType) ?? DefaultAtomChip;
286
- const position = atomPositions.get(instance.key);
287
- const width = position?.width ?? atomContentWidth;
288
- return (
289
- <View
290
- key={instance.key}
291
- nativeID={`${ATOM_NATIVE_ID_PREFIX}${instance.key}`}
292
- collapsable={false}
293
- style={{
294
- position: 'absolute',
295
- top: Platform.OS === 'android' ? (position?.hostY ?? 0) : 0,
296
- left: Platform.OS === 'android' ? (position?.hostX ?? 0) : 0,
297
- width,
298
- }}>
299
- <AtomHost
300
- nativeID={`${ATOM_CONTENT_NATIVE_ID_PREFIX}${instance.key}`}
301
- component={Component}
302
- width={width}
303
- estimatedHeight={
304
- (atoms ?? []).find((atom) => atom.name === instance.nodeType)
305
- ?.estimatedHeight ?? DEFAULT_ATOM_CHIP_HEIGHT
306
- }
307
- visible={
308
- !position ||
291
+ : atomState.instances.map(instance => {
292
+ const Component = atomComponents.get(instance.nodeType) ?? DefaultAtomChip;
293
+ const position = atomPositions.get(instance.key);
294
+ const width = position?.width ?? atomContentWidth;
295
+
296
+ return (
297
+ <View
298
+ key={instance.key}
299
+ nativeID={`${ATOM_NATIVE_ID_PREFIX}${instance.key}`}
300
+ collapsable={false}
301
+ style={{
302
+ position: 'absolute',
303
+ top: Platform.OS === 'android' ? (position?.hostY ?? 0) : 0,
304
+ left: Platform.OS === 'android' ? (position?.hostX ?? 0) : 0,
305
+ width,
306
+ }}
307
+ >
308
+ <AtomHost
309
+ nativeID={`${ATOM_CONTENT_NATIVE_ID_PREFIX}${instance.key}`}
310
+ component={Component}
311
+ width={width}
312
+ estimatedHeight={
313
+ (atoms ?? []).find(atom => atom.name === instance.nodeType)
314
+ ?.estimatedHeight ?? DEFAULT_ATOM_CHIP_HEIGHT
315
+ }
316
+ visible={
317
+ !position ||
309
318
  atomIsVisible(
310
319
  position.y,
311
320
  position.height ??
312
321
  (atoms ?? []).find(
313
- (atom) => atom.name === instance.nodeType
322
+ atom => atom.name === instance.nodeType
314
323
  )?.estimatedHeight ??
315
324
  DEFAULT_ATOM_CHIP_HEIGHT,
316
325
  atomViewport ??
317
326
  (virtualizeAtoms ? nativeAtomViewport : undefined)
318
327
  )
319
- }
320
- atomProps={{
321
- attrs: instance.attrs,
322
- selected: selectedKeys.has(instance.key),
323
- readOnly: !editable,
324
- interactive: atomsInteractive,
325
- isViewer: false,
326
- nodeType: instance.nodeType,
327
- updateAttrs: (attrs) =>
328
- invokeAtomAttrsUpdate(
329
- documentHandle,
330
- instance,
331
- atomState.documentVersion,
332
- attrs
333
- ),
334
- editor: {
335
- select: () =>
336
- invokeAtomAction(
337
- documentHandle,
338
- instance,
339
- atomState.documentVersion,
340
- 'select'
341
- ),
342
- delete: () =>
343
- invokeAtomAction(
344
- documentHandle,
345
- instance,
346
- atomState.documentVersion,
347
- 'delete'
348
- ),
349
- focusBefore: () =>
350
- invokeAtomAction(
351
- documentHandle,
352
- instance,
353
- atomState.documentVersion,
354
- 'before'
355
- ),
356
- focusAfter: () =>
357
- invokeAtomAction(
358
- documentHandle,
359
- instance,
360
- atomState.documentVersion,
361
- 'after'
362
- ),
363
- },
364
- }}
365
- />
366
- </View>
367
- );
368
- }),
369
- [
328
+ }
329
+ atomProps={{
330
+ attrs: instance.attrs,
331
+ selected: selectedKeys.has(instance.key),
332
+ readOnly: !editable,
333
+ interactive: atomsInteractive,
334
+ isViewer: false,
335
+ nodeType: instance.nodeType,
336
+ updateAttrs: attrs =>
337
+ invokeAtomAttrsUpdate(
338
+ documentHandle,
339
+ instance,
340
+ atomState.documentVersion,
341
+ attrs
342
+ ),
343
+ editor: {
344
+ select: () =>
345
+ invokeAtomAction(
346
+ documentHandle,
347
+ instance,
348
+ atomState.documentVersion,
349
+ 'select'
350
+ ),
351
+ delete: () =>
352
+ invokeAtomAction(
353
+ documentHandle,
354
+ instance,
355
+ atomState.documentVersion,
356
+ 'delete'
357
+ ),
358
+ focusBefore: () =>
359
+ invokeAtomAction(
360
+ documentHandle,
361
+ instance,
362
+ atomState.documentVersion,
363
+ 'before'
364
+ ),
365
+ focusAfter: () =>
366
+ invokeAtomAction(
367
+ documentHandle,
368
+ instance,
369
+ atomState.documentVersion,
370
+ 'after'
371
+ ),
372
+ },
373
+ }}
374
+ />
375
+ </View>
376
+ );
377
+ }),
378
+ [ atomContentWidth,
379
+ atomState.instances,
380
+ atomState.documentVersion,
381
+ atomComponents,
382
+ atomPositions,
370
383
  atoms,
371
384
  atomViewport,
372
- documentHandle,
373
- invokeAtomAction,
374
385
  virtualizeAtoms,
375
386
  nativeAtomViewport,
376
- atomsInteractive,
377
- atomComponents,
378
- atomContentWidth,
379
- atomPositions,
380
- atomState.instances,
387
+ selectedKeys,
381
388
  editable,
389
+ atomsInteractive,
382
390
  invokeAtomAttrsUpdate,
383
- selectedKeys,
384
- ]
391
+ documentHandle,
392
+ invokeAtomAction ]
385
393
  );
386
394
 
387
395
  const isLinkActive = activeState.marks.link === true;
@@ -417,7 +425,9 @@ export function useRichTextEditorPresentation(
417
425
  onRequestLink,
418
426
  onRequestImage
419
427
  );
428
+
420
429
  toolbarItemsJson = stringifyCachedJson(mappedItems);
430
+
421
431
  toolbarItemsSerializationCacheRef.current = {
422
432
  toolbarItems,
423
433
  editable,
@@ -432,7 +442,9 @@ export function useRichTextEditorPresentation(
432
442
 
433
443
  // A room document awaiting the server renders nothing (loading), never an
434
444
  // unshared fallback paragraph.
435
- if (!document.isReady) return null;
445
+ if (!document.isReady) {
446
+ return null;
447
+ }
436
448
 
437
449
  const usesNativeKeyboardToolbar =
438
450
  toolbarPlacement === 'keyboard' && (Platform.OS === 'ios' || Platform.OS === 'android');
@@ -462,14 +474,14 @@ export function useRichTextEditorPresentation(
462
474
 
463
475
  const currentPushedUpdate = pushedUpdate?.editorId === editorId ? pushedUpdate : null;
464
476
 
465
- const focusPreservingFrames = [...registeredToolbarFrames, ...suppliedFocusPreservingFrames];
477
+ const focusPreservingFrames = [ ...registeredToolbarFrames, ...suppliedFocusPreservingFrames ];
466
478
 
467
479
  const toolbarFrameJson = serializeToolbarFrames(
468
480
  editable && isFocused ? focusPreservingFrames : undefined
469
481
  );
470
482
 
471
483
  return (
472
- <View style={[styles.container, containerStyle]}>
484
+ <View style={[ styles.container, containerStyle ]}>
473
485
  <NativeEditorView
474
486
  ref={nativeViewRef}
475
487
  style={nativeViewStyle}
@@ -507,13 +519,15 @@ export function useRichTextEditorPresentation(
507
519
  onContentHeightChange={handleContentHeightChange}
508
520
  onAtomLayout={handleAtomLayout}
509
521
  onToolbarAction={handleToolbarAction}
510
- onAddonEvent={handleAddonEvent}>
522
+ onAddonEvent={handleAddonEvent}
523
+ >
511
524
  {atomChildren}
512
525
  </NativeEditorView>
513
526
  {shouldRenderJsToolbar ? (
514
527
  <View
515
- testID='native-editor-js-toolbar'
516
- style={[styles.inlineToolbar, { marginTop: inlineToolbarMarginTop }]}>
528
+ testID={'native-editor-js-toolbar'}
529
+ style={[ styles.inlineToolbar, { marginTop: inlineToolbarMarginTop } ]}
530
+ >
517
531
  <EditorToolbarFrameOwnerProvider ownerId={toolbarFrameOwnerId}>
518
532
  <EditorToolbar
519
533
  activeState={activeState}