@xom11/whiteboard 0.31.0 → 0.33.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.
Files changed (93) hide show
  1. package/dist/ai.d.mts +149 -28
  2. package/dist/ai.d.ts +149 -28
  3. package/dist/ai.js +2652 -430
  4. package/dist/ai.js.map +1 -1
  5. package/dist/ai.mjs +2482 -426
  6. package/dist/ai.mjs.map +1 -1
  7. package/dist/catalog.json +4 -4
  8. package/dist/{chunk-JJ4FPCBE.mjs → chunk-4EXRNZRX.mjs} +641 -75
  9. package/dist/chunk-4EXRNZRX.mjs.map +1 -0
  10. package/dist/{chunk-TMRFSOM7.mjs → chunk-4NJUTCFF.mjs} +4 -4
  11. package/dist/{chunk-TMRFSOM7.mjs.map → chunk-4NJUTCFF.mjs.map} +1 -1
  12. package/dist/{chunk-LTLLQUMN.mjs → chunk-BZZ5BROM.mjs} +6 -7
  13. package/dist/chunk-BZZ5BROM.mjs.map +1 -0
  14. package/dist/{host-KMWP7KBT.mjs → chunk-C3RDFBQ5.mjs} +20 -35
  15. package/dist/chunk-C3RDFBQ5.mjs.map +1 -0
  16. package/dist/chunk-C7C66BAV.mjs +11 -0
  17. package/dist/chunk-C7C66BAV.mjs.map +1 -0
  18. package/dist/{chunk-T3N4BSJV.mjs → chunk-DCFZTKFE.mjs} +13 -5
  19. package/dist/chunk-DCFZTKFE.mjs.map +1 -0
  20. package/dist/{chunk-44JY2AKC.mjs → chunk-F42MZ745.mjs} +3 -3
  21. package/dist/{chunk-44JY2AKC.mjs.map → chunk-F42MZ745.mjs.map} +1 -1
  22. package/dist/{chunk-BMYC2ILT.mjs → chunk-FOPZOVI3.mjs} +5 -4
  23. package/dist/chunk-FOPZOVI3.mjs.map +1 -0
  24. package/dist/{chunk-K5BS2H56.mjs → chunk-GKDQ5IV7.mjs} +4 -4
  25. package/dist/{chunk-K5BS2H56.mjs.map → chunk-GKDQ5IV7.mjs.map} +1 -1
  26. package/dist/{chunk-73Q7ADVL.mjs → chunk-MNHOFOM5.mjs} +2 -2
  27. package/dist/{chunk-73Q7ADVL.mjs.map → chunk-MNHOFOM5.mjs.map} +1 -1
  28. package/dist/{chunk-KOXOC2FI.mjs → chunk-NBMYET5H.mjs} +11 -15
  29. package/dist/chunk-NBMYET5H.mjs.map +1 -0
  30. package/dist/{chunk-DWIEVCGK.mjs → chunk-NTFG7ZRN.mjs} +53 -3
  31. package/dist/chunk-NTFG7ZRN.mjs.map +1 -0
  32. package/dist/{chunk-C76SOFXF.mjs → chunk-QCK3Z5WN.mjs} +3 -3
  33. package/dist/{chunk-C76SOFXF.mjs.map → chunk-QCK3Z5WN.mjs.map} +1 -1
  34. package/dist/chunk-SUXIMLYN.mjs +238 -0
  35. package/dist/chunk-SUXIMLYN.mjs.map +1 -0
  36. package/dist/geometry-2d.d.mts +1 -1
  37. package/dist/geometry-2d.d.ts +1 -1
  38. package/dist/geometry-2d.js +1026 -231
  39. package/dist/geometry-2d.js.map +1 -1
  40. package/dist/geometry-2d.mjs +6 -5
  41. package/dist/geometry-3d.d.mts +1 -1
  42. package/dist/geometry-3d.d.ts +1 -1
  43. package/dist/geometry-3d.js +4001 -475
  44. package/dist/geometry-3d.js.map +1 -1
  45. package/dist/geometry-3d.mjs +5 -5
  46. package/dist/graph-2d.d.mts +1 -1
  47. package/dist/graph-2d.d.ts +1 -1
  48. package/dist/graph-2d.js +712 -115
  49. package/dist/graph-2d.js.map +1 -1
  50. package/dist/graph-2d.mjs +5 -5
  51. package/dist/{handleExtractProblem-BrDY9ifM.d.ts → handleExtractProblem-mtJyhEw3.d.mts} +2 -0
  52. package/dist/{handleExtractProblem-BrDY9ifM.d.mts → handleExtractProblem-mtJyhEw3.d.ts} +2 -0
  53. package/dist/host-6WTLCXUE.mjs +62 -0
  54. package/dist/host-6WTLCXUE.mjs.map +1 -0
  55. package/dist/{host-H2IGOKJU.mjs → host-BWIXT5TR.mjs} +3 -3
  56. package/dist/{host-H2IGOKJU.mjs.map → host-BWIXT5TR.mjs.map} +1 -1
  57. package/dist/{host-4FIUNIDQ.mjs → host-QDVRULJV.mjs} +14 -11
  58. package/dist/host-QDVRULJV.mjs.map +1 -0
  59. package/dist/host-USOIVTQB.mjs +4976 -0
  60. package/dist/host-USOIVTQB.mjs.map +1 -0
  61. package/dist/index.d.mts +14 -4
  62. package/dist/index.d.ts +14 -4
  63. package/dist/index.js +4273 -521
  64. package/dist/index.js.map +1 -1
  65. package/dist/index.mjs +48 -27
  66. package/dist/index.mjs.map +1 -1
  67. package/dist/latex.d.mts +1 -1
  68. package/dist/latex.d.ts +1 -1
  69. package/dist/latex.mjs +1 -1
  70. package/dist/serialize-7UZWQQ4I.mjs +9 -0
  71. package/dist/{serialize-PGHQZEPV.mjs.map → serialize-7UZWQQ4I.mjs.map} +1 -1
  72. package/dist/studio.d.mts +35 -0
  73. package/dist/studio.d.ts +35 -0
  74. package/dist/studio.js +10883 -0
  75. package/dist/studio.js.map +1 -0
  76. package/dist/studio.mjs +28 -0
  77. package/dist/studio.mjs.map +1 -0
  78. package/dist/{types-tePd94vW.d.ts → types-eEEEVsLF.d.mts} +1 -1
  79. package/dist/{types-tePd94vW.d.mts → types-eEEEVsLF.d.ts} +1 -1
  80. package/package.json +12 -2
  81. package/dist/chunk-BMYC2ILT.mjs.map +0 -1
  82. package/dist/chunk-DWIEVCGK.mjs.map +0 -1
  83. package/dist/chunk-JJ4FPCBE.mjs.map +0 -1
  84. package/dist/chunk-KOXOC2FI.mjs.map +0 -1
  85. package/dist/chunk-LTLLQUMN.mjs.map +0 -1
  86. package/dist/chunk-QK6OVDLC.mjs +0 -103
  87. package/dist/chunk-QK6OVDLC.mjs.map +0 -1
  88. package/dist/chunk-T3N4BSJV.mjs.map +0 -1
  89. package/dist/host-4FIUNIDQ.mjs.map +0 -1
  90. package/dist/host-4ZB4XD4S.mjs +0 -2378
  91. package/dist/host-4ZB4XD4S.mjs.map +0 -1
  92. package/dist/host-KMWP7KBT.mjs.map +0 -1
  93. package/dist/serialize-PGHQZEPV.mjs +0 -9
package/dist/index.d.mts CHANGED
@@ -3,8 +3,8 @@ import { NonDeletedExcalidrawElement } from '@excalidraw/excalidraw/element/type
3
3
  export { ExcalidrawElement, NonDeletedExcalidrawElement } from '@excalidraw/excalidraw/element/types';
4
4
  import { AppState, BinaryFiles } from '@excalidraw/excalidraw/types';
5
5
  export { AppState, BinaryFiles } from '@excalidraw/excalidraw/types';
6
- import { S as StampType, G as GenerateGeometryFigure, a as GeometryDraftPreview } from './types-tePd94vW.mjs';
7
- export { A as AiFigureProgress, b as AiFigureUiResult, B as BaseStampCustomData } from './types-tePd94vW.mjs';
6
+ import { S as StampType, G as GenerateGeometryFigure, a as GeometryDraftPreview } from './types-eEEEVsLF.mjs';
7
+ export { A as AiFigureProgress, b as AiFigureUiResult, B as BaseStampCustomData } from './types-eEEEVsLF.mjs';
8
8
  import { GeometryCustomData } from './geometry-2d.mjs';
9
9
  export { geometryStamp } from './geometry-2d.mjs';
10
10
  import { LatexCustomData } from './latex.mjs';
@@ -14,7 +14,7 @@ export { geometry3dStamp } from './geometry-3d.mjs';
14
14
  import { Graph2DCustomData } from './graph-2d.mjs';
15
15
  export { graph2dStamp } from './graph-2d.mjs';
16
16
  import { PDFDocumentProxy } from 'pdfjs-dist';
17
- export { E as ExtractUiResult, H as HandleExtractProblemOptions, I as ImagePart, h as handleExtractProblem } from './handleExtractProblem-BrDY9ifM.mjs';
17
+ export { E as ExtractUiResult, H as HandleExtractProblemOptions, I as ImagePart, h as handleExtractProblem } from './handleExtractProblem-mtJyhEw3.mjs';
18
18
  import 'react';
19
19
 
20
20
  interface SyncableAppState {
@@ -282,4 +282,14 @@ declare function insertPdfPages(api: ExApi, source: File | Blob | ArrayBuffer, o
282
282
  */
283
283
  declare function parsePageRange(input: string, totalPages: number): number[];
284
284
 
285
- export { ALL_STAMPS, DEFAULT_STAMPS, EXPERIMENTAL_STAMPS, type ExcalidrawSceneSnapshot, GenerateGeometryFigure, Geometry3DCustomData, GeometryCustomData, GeometryDraftPreview, Graph2DCustomData, type InsertPdfPagesOptions, type InsertPdfPagesResult, type InsertRasterizedPagesOptions, type InsertRasterizedPagesResult, LatexCustomData, type RasterizeOptions, type RasterizedPage, STABLE_STAMPS, STAMP_CATALOG, type StampCatalogEntry, type StampCustomData, StampType, type SyncableAppState, Whiteboard, type WhiteboardProps, closePdfDocument, configurePdfWorker, findCatalogEntry, findStampForCustomData, insertPdfPages, insertRasterizedPagesIntoScene, isStampElement, loadPdfDocument, parsePageRange, pickSyncableAppState, rasterizePdf, restoreMissingStampFiles };
285
+ /**
286
+ * Chèn một hình học (dạng `jsonState`) vào Excalidraw scene như một stamp
287
+ * re-edit được. Dùng cho handoff "Mở trong bảng trắng": trang landing ghi
288
+ * `jsonState` vào sessionStorage, trang /whiteboard đọc ra rồi gọi hàm này.
289
+ *
290
+ * `api` là `ExcalidrawImperativeAPI` — để `unknown` ở public API cho consumer
291
+ * không phải khớp type Excalidraw.
292
+ */
293
+ declare function insertGeometryStampIntoScene(api: unknown, jsonState: string): Promise<void>;
294
+
295
+ export { ALL_STAMPS, DEFAULT_STAMPS, EXPERIMENTAL_STAMPS, type ExcalidrawSceneSnapshot, GenerateGeometryFigure, Geometry3DCustomData, GeometryCustomData, GeometryDraftPreview, Graph2DCustomData, type InsertPdfPagesOptions, type InsertPdfPagesResult, type InsertRasterizedPagesOptions, type InsertRasterizedPagesResult, LatexCustomData, type RasterizeOptions, type RasterizedPage, STABLE_STAMPS, STAMP_CATALOG, type StampCatalogEntry, type StampCustomData, StampType, type SyncableAppState, Whiteboard, type WhiteboardProps, closePdfDocument, configurePdfWorker, findCatalogEntry, findStampForCustomData, insertGeometryStampIntoScene, insertPdfPages, insertRasterizedPagesIntoScene, isStampElement, loadPdfDocument, parsePageRange, pickSyncableAppState, rasterizePdf, restoreMissingStampFiles };
package/dist/index.d.ts CHANGED
@@ -3,8 +3,8 @@ import { NonDeletedExcalidrawElement } from '@excalidraw/excalidraw/element/type
3
3
  export { ExcalidrawElement, NonDeletedExcalidrawElement } from '@excalidraw/excalidraw/element/types';
4
4
  import { AppState, BinaryFiles } from '@excalidraw/excalidraw/types';
5
5
  export { AppState, BinaryFiles } from '@excalidraw/excalidraw/types';
6
- import { S as StampType, G as GenerateGeometryFigure, a as GeometryDraftPreview } from './types-tePd94vW.js';
7
- export { A as AiFigureProgress, b as AiFigureUiResult, B as BaseStampCustomData } from './types-tePd94vW.js';
6
+ import { S as StampType, G as GenerateGeometryFigure, a as GeometryDraftPreview } from './types-eEEEVsLF.js';
7
+ export { A as AiFigureProgress, b as AiFigureUiResult, B as BaseStampCustomData } from './types-eEEEVsLF.js';
8
8
  import { GeometryCustomData } from './geometry-2d.js';
9
9
  export { geometryStamp } from './geometry-2d.js';
10
10
  import { LatexCustomData } from './latex.js';
@@ -14,7 +14,7 @@ export { geometry3dStamp } from './geometry-3d.js';
14
14
  import { Graph2DCustomData } from './graph-2d.js';
15
15
  export { graph2dStamp } from './graph-2d.js';
16
16
  import { PDFDocumentProxy } from 'pdfjs-dist';
17
- export { E as ExtractUiResult, H as HandleExtractProblemOptions, I as ImagePart, h as handleExtractProblem } from './handleExtractProblem-BrDY9ifM.js';
17
+ export { E as ExtractUiResult, H as HandleExtractProblemOptions, I as ImagePart, h as handleExtractProblem } from './handleExtractProblem-mtJyhEw3.js';
18
18
  import 'react';
19
19
 
20
20
  interface SyncableAppState {
@@ -282,4 +282,14 @@ declare function insertPdfPages(api: ExApi, source: File | Blob | ArrayBuffer, o
282
282
  */
283
283
  declare function parsePageRange(input: string, totalPages: number): number[];
284
284
 
285
- export { ALL_STAMPS, DEFAULT_STAMPS, EXPERIMENTAL_STAMPS, type ExcalidrawSceneSnapshot, GenerateGeometryFigure, Geometry3DCustomData, GeometryCustomData, GeometryDraftPreview, Graph2DCustomData, type InsertPdfPagesOptions, type InsertPdfPagesResult, type InsertRasterizedPagesOptions, type InsertRasterizedPagesResult, LatexCustomData, type RasterizeOptions, type RasterizedPage, STABLE_STAMPS, STAMP_CATALOG, type StampCatalogEntry, type StampCustomData, StampType, type SyncableAppState, Whiteboard, type WhiteboardProps, closePdfDocument, configurePdfWorker, findCatalogEntry, findStampForCustomData, insertPdfPages, insertRasterizedPagesIntoScene, isStampElement, loadPdfDocument, parsePageRange, pickSyncableAppState, rasterizePdf, restoreMissingStampFiles };
285
+ /**
286
+ * Chèn một hình học (dạng `jsonState`) vào Excalidraw scene như một stamp
287
+ * re-edit được. Dùng cho handoff "Mở trong bảng trắng": trang landing ghi
288
+ * `jsonState` vào sessionStorage, trang /whiteboard đọc ra rồi gọi hàm này.
289
+ *
290
+ * `api` là `ExcalidrawImperativeAPI` — để `unknown` ở public API cho consumer
291
+ * không phải khớp type Excalidraw.
292
+ */
293
+ declare function insertGeometryStampIntoScene(api: unknown, jsonState: string): Promise<void>;
294
+
295
+ export { ALL_STAMPS, DEFAULT_STAMPS, EXPERIMENTAL_STAMPS, type ExcalidrawSceneSnapshot, GenerateGeometryFigure, Geometry3DCustomData, GeometryCustomData, GeometryDraftPreview, Graph2DCustomData, type InsertPdfPagesOptions, type InsertPdfPagesResult, type InsertRasterizedPagesOptions, type InsertRasterizedPagesResult, LatexCustomData, type RasterizeOptions, type RasterizedPage, STABLE_STAMPS, STAMP_CATALOG, type StampCatalogEntry, type StampCustomData, StampType, type SyncableAppState, Whiteboard, type WhiteboardProps, closePdfDocument, configurePdfWorker, findCatalogEntry, findStampForCustomData, insertGeometryStampIntoScene, insertPdfPages, insertRasterizedPagesIntoScene, isStampElement, loadPdfDocument, parsePageRange, pickSyncableAppState, rasterizePdf, restoreMissingStampFiles };