@drghaliasri/butex 8.1.3 → 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.
- package/dist/book.d.mts +1 -0
- package/dist/book.d.ts +1 -0
- package/dist/book.js +17 -1
- package/dist/book.js.map +1 -1
- package/dist/book.mjs +17 -1
- package/dist/book.mjs.map +1 -1
- package/dist/document-cli.js +16 -1
- package/dist/document-cli.js.map +1 -1
- package/dist/document.d.mts +1 -0
- package/dist/document.d.ts +1 -0
- package/dist/document.js +10 -2
- package/dist/document.js.map +1 -1
- package/dist/document.mjs +10 -2
- package/dist/document.mjs.map +1 -1
- package/dist/react-book.d.mts +12 -1
- package/dist/react-book.d.ts +12 -1
- package/dist/react-book.js +2632 -1917
- package/dist/react-book.js.map +1 -1
- package/dist/react-book.mjs +2475 -1760
- package/dist/react-book.mjs.map +1 -1
- package/dist/react-document-preview.d.mts +2 -1
- package/dist/react-document-preview.d.ts +2 -1
- package/dist/react-document-preview.js +16 -112
- package/dist/react-document-preview.js.map +1 -1
- package/dist/react-document-preview.mjs +16 -112
- package/dist/react-document-preview.mjs.map +1 -1
- package/dist/react-document.d.mts +5 -3
- package/dist/react-document.d.ts +5 -3
- package/dist/react-document.js +1818 -1455
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +1709 -1346
- package/dist/react-document.mjs.map +1 -1
- package/dist/react.js +1274 -818
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1232 -776
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react-book.d.mts
CHANGED
|
@@ -324,6 +324,7 @@ type DocumentBookTarget = {
|
|
|
324
324
|
kind: DocumentLabelKind | 'section' | 'subsection' | 'subsubsection' | 'chapter' | 'appendix';
|
|
325
325
|
caption?: string;
|
|
326
326
|
displayLabel?: string;
|
|
327
|
+
ordinal?: string;
|
|
327
328
|
manualKey?: string;
|
|
328
329
|
};
|
|
329
330
|
type DocumentBookContext = {
|
|
@@ -518,10 +519,20 @@ type ButexBookEditorProps = {
|
|
|
518
519
|
onRequestImagePick?: ButexDocumentEditorProps['onRequestImagePick'];
|
|
519
520
|
resolveImageUrl?: ButexDocumentEditorProps['resolveImageUrl'];
|
|
520
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. */
|
|
521
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;
|
|
522
533
|
className?: string;
|
|
523
534
|
};
|
|
524
535
|
/** Only the active chapter has a mounted Document editor. Drafts for inactive units stay in memory. */
|
|
525
|
-
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;
|
|
526
537
|
|
|
527
538
|
export { ButexBookEditor, type ButexBookEditorProps };
|
package/dist/react-book.d.ts
CHANGED
|
@@ -324,6 +324,7 @@ type DocumentBookTarget = {
|
|
|
324
324
|
kind: DocumentLabelKind | 'section' | 'subsection' | 'subsubsection' | 'chapter' | 'appendix';
|
|
325
325
|
caption?: string;
|
|
326
326
|
displayLabel?: string;
|
|
327
|
+
ordinal?: string;
|
|
327
328
|
manualKey?: string;
|
|
328
329
|
};
|
|
329
330
|
type DocumentBookContext = {
|
|
@@ -518,10 +519,20 @@ type ButexBookEditorProps = {
|
|
|
518
519
|
onRequestImagePick?: ButexDocumentEditorProps['onRequestImagePick'];
|
|
519
520
|
resolveImageUrl?: ButexDocumentEditorProps['resolveImageUrl'];
|
|
520
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. */
|
|
521
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;
|
|
522
533
|
className?: string;
|
|
523
534
|
};
|
|
524
535
|
/** Only the active chapter has a mounted Document editor. Drafts for inactive units stay in memory. */
|
|
525
|
-
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;
|
|
526
537
|
|
|
527
538
|
export { ButexBookEditor, type ButexBookEditorProps };
|