@drghaliasri/butex 8.1.5 → 8.2.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.
@@ -519,10 +519,20 @@ type ButexBookEditorProps = {
519
519
  onRequestImagePick?: ButexDocumentEditorProps['onRequestImagePick'];
520
520
  resolveImageUrl?: ButexDocumentEditorProps['resolveImageUrl'];
521
521
  initialUnitId?: string;
522
+ /** Controlled selection, if supplied. Hosts must handle onRequestActiveUnitChange. */
523
+ activeUnitId?: string | null;
524
+ /** Runs before capture/remount; return false (or reject) to retain the original chapter. */
525
+ beforeUnitChange?: (fromUnitId: string | null, toUnitId: string) => boolean | Promise<boolean>;
526
+ onRequestActiveUnitChange?: (unitId: string) => void;
527
+ /** Notification after the active chapter actually changes, also called on first mount. */
522
528
  onActiveUnitChange?: (unitId: string | null) => void;
529
+ /** Allow the Al-Bayan host to own book structure mutations without duplicate controls. */
530
+ showStructureTools?: boolean;
531
+ /** Host can own its own picker while using the same controlled selection API. */
532
+ showInternalNavigation?: boolean;
523
533
  className?: string;
524
534
  };
525
535
  /** Only the active chapter has a mounted Document editor. Drafts for inactive units stay in memory. */
526
- declare function ButexBookEditor({ manifest, references, resolution, loadUnit, onUnitDraftChange, onStructureCommand, saveStatus, onRequestImagePick, resolveImageUrl, initialUnitId, onActiveUnitChange, className, }: ButexBookEditorProps): react_jsx_runtime.JSX.Element;
536
+ declare function ButexBookEditor({ manifest, references, resolution, loadUnit, onUnitDraftChange, onStructureCommand, saveStatus, onRequestImagePick, resolveImageUrl, initialUnitId, activeUnitId, beforeUnitChange, onRequestActiveUnitChange, onActiveUnitChange, showStructureTools, showInternalNavigation, className, }: ButexBookEditorProps): react_jsx_runtime.JSX.Element;
527
537
 
528
538
  export { ButexBookEditor, type ButexBookEditorProps };
@@ -519,10 +519,20 @@ type ButexBookEditorProps = {
519
519
  onRequestImagePick?: ButexDocumentEditorProps['onRequestImagePick'];
520
520
  resolveImageUrl?: ButexDocumentEditorProps['resolveImageUrl'];
521
521
  initialUnitId?: string;
522
+ /** Controlled selection, if supplied. Hosts must handle onRequestActiveUnitChange. */
523
+ activeUnitId?: string | null;
524
+ /** Runs before capture/remount; return false (or reject) to retain the original chapter. */
525
+ beforeUnitChange?: (fromUnitId: string | null, toUnitId: string) => boolean | Promise<boolean>;
526
+ onRequestActiveUnitChange?: (unitId: string) => void;
527
+ /** Notification after the active chapter actually changes, also called on first mount. */
522
528
  onActiveUnitChange?: (unitId: string | null) => void;
529
+ /** Allow the Al-Bayan host to own book structure mutations without duplicate controls. */
530
+ showStructureTools?: boolean;
531
+ /** Host can own its own picker while using the same controlled selection API. */
532
+ showInternalNavigation?: boolean;
523
533
  className?: string;
524
534
  };
525
535
  /** Only the active chapter has a mounted Document editor. Drafts for inactive units stay in memory. */
526
- declare function ButexBookEditor({ manifest, references, resolution, loadUnit, onUnitDraftChange, onStructureCommand, saveStatus, onRequestImagePick, resolveImageUrl, initialUnitId, onActiveUnitChange, className, }: ButexBookEditorProps): react_jsx_runtime.JSX.Element;
536
+ declare function ButexBookEditor({ manifest, references, resolution, loadUnit, onUnitDraftChange, onStructureCommand, saveStatus, onRequestImagePick, resolveImageUrl, initialUnitId, activeUnitId, beforeUnitChange, onRequestActiveUnitChange, onActiveUnitChange, showStructureTools, showInternalNavigation, className, }: ButexBookEditorProps): react_jsx_runtime.JSX.Element;
527
537
 
528
538
  export { ButexBookEditor, type ButexBookEditorProps };