mathlean-canvas 0.3.4 → 0.3.6

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 (36) hide show
  1. package/README.md +124 -6
  2. package/dist/InlineMathLiveField.d.ts +5 -1
  3. package/dist/MathCanvas/components/CanvasOverlayViewport.d.ts +5 -3
  4. package/dist/MathCanvas/components/CollaborationOverlay.d.ts +10 -0
  5. package/dist/MathCanvas/components/ShortcutMenu.d.ts +10 -0
  6. package/dist/MathCanvas/components/Toolbar.d.ts +7 -6
  7. package/dist/MathCanvas/components/icons.d.ts +13 -1
  8. package/dist/MathCanvas/core/hooks/useCanvasGlobalActions.d.ts +2 -9
  9. package/dist/MathCanvas/core/hooks/useCanvasSnapshot.d.ts +7 -2
  10. package/dist/MathCanvas/core/hooks/useCanvasStageInteractions.d.ts +31 -6
  11. package/dist/MathCanvas/core/hooks/useCanvasViewport.d.ts +5 -1
  12. package/dist/MathCanvas/features/geometry/components/CoordinatePlaneLayer.d.ts +2 -1
  13. package/dist/MathCanvas/features/graph/components/GraphLayer.d.ts +17 -2
  14. package/dist/MathCanvas/features/plot/components/PlotControls.d.ts +2 -1
  15. package/dist/MathCanvas/features/plot/components/PlotLayer.d.ts +3 -2
  16. package/dist/MathCanvas/features/plot/utils/plotCompiler.d.ts +6 -2
  17. package/dist/MathCanvas/features/plot/utils/plotModel.d.ts +3 -1
  18. package/dist/MathCanvas/features/stroke/hooks/useStrokeState.d.ts +13 -3
  19. package/dist/MathCanvas/features/text/components/InlineMathBubble.d.ts +3 -1
  20. package/dist/MathCanvas/features/text/components/TextBlockEditor.d.ts +3 -7
  21. package/dist/MathCanvas/features/text/components/TextBlockMenu.d.ts +8 -3
  22. package/dist/MathCanvas/features/text/components/TextBlockView.d.ts +7 -5
  23. package/dist/MathCanvas/features/text/components/TextInteractionLayer.d.ts +11 -2
  24. package/dist/MathCanvas/features/text/hooks/useTextBlockActions.d.ts +2 -2
  25. package/dist/MathCanvas/features/text/hooks/useTextBlockEditingActions.d.ts +1 -5
  26. package/dist/MathCanvas/features/text/hooks/useTextBlockLayoutEffects.d.ts +15 -22
  27. package/dist/MathCanvas/features/text/hooks/useTextBlockRenderHelpers.d.ts +1 -5
  28. package/dist/MathCanvas/features/text/hooks/useTextboxResize.d.ts +1 -5
  29. package/dist/MathCanvas/shortcuts.d.ts +20 -0
  30. package/dist/MathCanvas/types.d.ts +123 -0
  31. package/dist/MathCanvas/utils/latex.d.ts +1 -0
  32. package/dist/MathCanvas.d.ts +2 -2
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.js +18381 -15903
  35. package/dist/useInlineMathSession.d.ts +4 -2
  36. package/package.json +1 -1
@@ -13,6 +13,7 @@ export type ActiveInlineMathSession = {
13
13
  start: number;
14
14
  end: number;
15
15
  displayMode: boolean;
16
+ initialPosition?: "start" | "end";
16
17
  tailAfter?: string;
17
18
  };
18
19
  export type InlineMathPreview = {
@@ -49,7 +50,8 @@ export declare function useInlineMathSession({ blocks, editingBlockId, editingVa
49
50
  activeInlineMathSession: ActiveInlineMathSession | null;
50
51
  activeInlineMathSessionRef: RefObject<ActiveInlineMathSession | null>;
51
52
  editingDisplayValue: string;
52
- inlineMathEditorMode: "mathlive" | "fallback";
53
+ inlineMathEditorMode: "fallback" | "mathlive";
54
+ isOpeningInlineMathSession: boolean;
53
55
  isOpeningInlineMathSessionRef: RefObject<boolean>;
54
56
  latexPreview: InlineMathPreview;
55
57
  markInlineMathEditorReady: () => void;
@@ -58,7 +60,7 @@ export declare function useInlineMathSession({ blocks, editingBlockId, editingVa
58
60
  activateInlineMathFallback: (fallbackLatex?: string) => void;
59
61
  resetInlineMathState: () => void;
60
62
  insertInlineMathAtSelection: (start: number, end: number) => void;
61
- reopenInlineMathSessionAtBoundary: (direction: "before" | "after") => boolean;
63
+ reopenInlineMathSessionAtBoundary: (direction: "before" | "after", selection?: number) => boolean;
62
64
  commitActiveInlineMathDraft: () => void;
63
65
  exitActiveInlineMathDraft: (direction: "before" | "after") => void;
64
66
  cancelActiveInlineMathDraft: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mathlean-canvas",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",