@xom11/whiteboard 0.24.0 → 0.24.2

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 (98) hide show
  1. package/README.md +1 -1
  2. package/dist/{ExcalidrawWithMenus-KBLDWPM2.mjs → ExcalidrawWithMenus-WENZRYYE.mjs} +2 -2
  3. package/dist/{ExcalidrawWithMenus-KBLDWPM2.mjs.map → ExcalidrawWithMenus-WENZRYYE.mjs.map} +1 -1
  4. package/dist/ai.d.mts +616 -0
  5. package/dist/ai.d.ts +616 -0
  6. package/dist/ai.js +1036 -0
  7. package/dist/ai.js.map +1 -0
  8. package/dist/ai.mjs +999 -0
  9. package/dist/ai.mjs.map +1 -0
  10. package/dist/catalog.json +4 -4
  11. package/dist/{chunk-TOOHCAWP.mjs → chunk-2WF6KIGF.mjs} +5 -4
  12. package/dist/chunk-2WF6KIGF.mjs.map +1 -0
  13. package/dist/{chunk-2SKXRBGS.mjs → chunk-45CGKJ7S.mjs} +4 -4
  14. package/dist/{chunk-2SKXRBGS.mjs.map → chunk-45CGKJ7S.mjs.map} +1 -1
  15. package/dist/{chunk-O6QTYAKE.mjs → chunk-4DS3MKID.mjs} +4 -4
  16. package/dist/{chunk-O6QTYAKE.mjs.map → chunk-4DS3MKID.mjs.map} +1 -1
  17. package/dist/chunk-73Q7ADVL.mjs +35 -0
  18. package/dist/chunk-73Q7ADVL.mjs.map +1 -0
  19. package/dist/{chunk-XVSO7FBM.mjs → chunk-7WQXXEVR.mjs} +5 -5
  20. package/dist/{chunk-XVSO7FBM.mjs.map → chunk-7WQXXEVR.mjs.map} +1 -1
  21. package/dist/{chunk-VBJLUHCY.mjs → chunk-AZIARTGX.mjs} +3 -3
  22. package/dist/{chunk-VBJLUHCY.mjs.map → chunk-AZIARTGX.mjs.map} +1 -1
  23. package/dist/{chunk-RBUILBX3.mjs → chunk-BEZSQKPY.mjs} +6 -5
  24. package/dist/chunk-BEZSQKPY.mjs.map +1 -0
  25. package/dist/{chunk-6XUPIGVD.mjs → chunk-BKSXPNPQ.mjs} +4 -123
  26. package/dist/chunk-BKSXPNPQ.mjs.map +1 -0
  27. package/dist/{chunk-FZY33J6Z.mjs → chunk-CGZZO4BX.mjs} +7 -6
  28. package/dist/chunk-CGZZO4BX.mjs.map +1 -0
  29. package/dist/{chunk-RD34F5PM.mjs → chunk-ICR4CVOE.mjs} +2 -2
  30. package/dist/chunk-ICR4CVOE.mjs.map +1 -0
  31. package/dist/{chunk-7WG2KDRF.mjs → chunk-KRC2XOIG.mjs} +3 -3
  32. package/dist/{chunk-7WG2KDRF.mjs.map → chunk-KRC2XOIG.mjs.map} +1 -1
  33. package/dist/{chunk-33PEN2WC.mjs → chunk-LVNCYP4J.mjs} +6 -6
  34. package/dist/{chunk-33PEN2WC.mjs.map → chunk-LVNCYP4J.mjs.map} +1 -1
  35. package/dist/{chunk-TQYQVXNW.mjs → chunk-QGNU34T7.mjs} +2 -2
  36. package/dist/chunk-QGNU34T7.mjs.map +1 -0
  37. package/dist/{chunk-RXOFO64U.mjs → chunk-SGFJLHHG.mjs} +3 -3
  38. package/dist/{chunk-RXOFO64U.mjs.map → chunk-SGFJLHHG.mjs.map} +1 -1
  39. package/dist/chunk-WM2VDYQA.mjs +1771 -0
  40. package/dist/chunk-WM2VDYQA.mjs.map +1 -0
  41. package/dist/{chunk-VRWZILTG.mjs → chunk-ZBJBQKJ2.mjs} +128 -3
  42. package/dist/chunk-ZBJBQKJ2.mjs.map +1 -0
  43. package/dist/geometry-2d.d.mts +2 -1
  44. package/dist/geometry-2d.d.ts +2 -1
  45. package/dist/geometry-2d.js +2056 -100
  46. package/dist/geometry-2d.js.map +1 -1
  47. package/dist/geometry-2d.mjs +7 -6
  48. package/dist/geometry-3d.d.mts +2 -1
  49. package/dist/geometry-3d.d.ts +2 -1
  50. package/dist/geometry-3d.js +2051 -15
  51. package/dist/geometry-3d.js.map +1 -1
  52. package/dist/geometry-3d.mjs +6 -5
  53. package/dist/graph-2d.d.mts +2 -1
  54. package/dist/graph-2d.d.ts +2 -1
  55. package/dist/graph-2d.js +1938 -8
  56. package/dist/graph-2d.js.map +1 -1
  57. package/dist/graph-2d.mjs +9 -8
  58. package/dist/{host-EVJT3LIF.mjs → host-EPZCNFLH.mjs} +31 -29
  59. package/dist/host-EPZCNFLH.mjs.map +1 -0
  60. package/dist/{host-3N4E4KJH.mjs → host-LKCMYEAV.mjs} +12 -11
  61. package/dist/host-LKCMYEAV.mjs.map +1 -0
  62. package/dist/{host-6SNSZ332.mjs → host-QS2EOTRJ.mjs} +3 -3
  63. package/dist/{host-6SNSZ332.mjs.map → host-QS2EOTRJ.mjs.map} +1 -1
  64. package/dist/{host-HN4X3TBC.mjs → host-ZIQ77W33.mjs} +9 -8
  65. package/dist/host-ZIQ77W33.mjs.map +1 -0
  66. package/dist/index.d.mts +4 -616
  67. package/dist/index.d.ts +4 -616
  68. package/dist/index.js +2095 -1171
  69. package/dist/index.js.map +1 -1
  70. package/dist/index.mjs +25 -1025
  71. package/dist/index.mjs.map +1 -1
  72. package/dist/latex.d.mts +2 -1
  73. package/dist/latex.d.ts +2 -1
  74. package/dist/latex.js.map +1 -1
  75. package/dist/latex.mjs +1 -1
  76. package/dist/render-SA4JTOW3.mjs +8 -0
  77. package/dist/{render-OCVGDKK6.mjs.map → render-SA4JTOW3.mjs.map} +1 -1
  78. package/dist/serialize-JAVOU22E.mjs +7 -0
  79. package/dist/{serialize-GKN6OVPM.mjs.map → serialize-JAVOU22E.mjs.map} +1 -1
  80. package/dist/{types-rA4slL08.d.mts → types-Crbefnfe.d.ts} +2 -49
  81. package/dist/types-DxlMPh-6.d.mts +49 -0
  82. package/dist/types-DxlMPh-6.d.ts +49 -0
  83. package/dist/{types-rA4slL08.d.ts → types-vtvyKGAA.d.mts} +2 -49
  84. package/package.json +16 -2
  85. package/dist/chunk-3KBL77M6.mjs +0 -127
  86. package/dist/chunk-3KBL77M6.mjs.map +0 -1
  87. package/dist/chunk-6XUPIGVD.mjs.map +0 -1
  88. package/dist/chunk-FZY33J6Z.mjs.map +0 -1
  89. package/dist/chunk-RBUILBX3.mjs.map +0 -1
  90. package/dist/chunk-RD34F5PM.mjs.map +0 -1
  91. package/dist/chunk-TOOHCAWP.mjs.map +0 -1
  92. package/dist/chunk-TQYQVXNW.mjs.map +0 -1
  93. package/dist/chunk-VRWZILTG.mjs.map +0 -1
  94. package/dist/host-3N4E4KJH.mjs.map +0 -1
  95. package/dist/host-EVJT3LIF.mjs.map +0 -1
  96. package/dist/host-HN4X3TBC.mjs.map +0 -1
  97. package/dist/render-OCVGDKK6.mjs +0 -8
  98. package/dist/serialize-GKN6OVPM.mjs +0 -6
package/dist/graph-2d.mjs CHANGED
@@ -1,13 +1,14 @@
1
1
  "use client";
2
- export { graph2dStamp } from './chunk-XVSO7FBM.mjs';
3
- import './chunk-33PEN2WC.mjs';
2
+ export { graph2dStamp } from './chunk-7WQXXEVR.mjs';
3
+ import './chunk-LVNCYP4J.mjs';
4
4
  import './chunk-O4WIZFRQ.mjs';
5
- import './chunk-VBJLUHCY.mjs';
6
- import './chunk-7WG2KDRF.mjs';
7
- import './chunk-6XUPIGVD.mjs';
8
- import './chunk-RD34F5PM.mjs';
9
- import './chunk-3KBL77M6.mjs';
10
- import './chunk-VRWZILTG.mjs';
5
+ import './chunk-AZIARTGX.mjs';
6
+ import './chunk-KRC2XOIG.mjs';
7
+ import './chunk-BKSXPNPQ.mjs';
8
+ import './chunk-ICR4CVOE.mjs';
9
+ import './chunk-WM2VDYQA.mjs';
10
+ import './chunk-ZBJBQKJ2.mjs';
11
+ import './chunk-73Q7ADVL.mjs';
11
12
  import './chunk-5UTGXHLJ.mjs';
12
13
  //# sourceMappingURL=graph-2d.mjs.map
13
14
  //# sourceMappingURL=graph-2d.mjs.map
@@ -1,38 +1,21 @@
1
1
  "use client";
2
- import { useToolStateMachine } from './chunk-NVJ7K3DK.mjs';
3
- import { serializeBoard, renderGeometrySvgFromState, isGeometryCustomData, deserializeBoard } from './chunk-FZY33J6Z.mjs';
4
- import { JxgRenderer } from './chunk-6XUPIGVD.mjs';
5
2
  import { useChordShortcut } from './chunk-HNQLZIEP.mjs';
6
- import { safeJsx, initJxgBoard, attachJxgWheelZoom, useToast, ToastHost, STAMP_PANEL_DESKTOP, ToastProvider, useStampStore, StampLeftPanel } from './chunk-TOOHCAWP.mjs';
3
+ import { useToolStateMachine } from './chunk-NVJ7K3DK.mjs';
4
+ import { safeJsx, initJxgBoard, attachJxgWheelZoom, useToast, ToastHost, STAMP_PANEL_DESKTOP, ToastProvider, useStampStore, StampLeftPanel } from './chunk-2WF6KIGF.mjs';
5
+ import { serializeBoard, renderGeometrySvgFromState, isGeometryCustomData, deserializeBoard } from './chunk-CGZZO4BX.mjs';
7
6
  import { themeLabel, paletteFor, themeAxis, themeGrid } from './chunk-R5FL6S7L.mjs';
8
- import './chunk-RD34F5PM.mjs';
9
- import { DEFAULT_VIEW_2D, nextLabel, useEditorState, listObjects } from './chunk-3KBL77M6.mjs';
10
- import './chunk-VRWZILTG.mjs';
7
+ import { JxgRenderer } from './chunk-BKSXPNPQ.mjs';
8
+ import './chunk-ICR4CVOE.mjs';
9
+ import { nextLabel, useEditorState, listObjects } from './chunk-WM2VDYQA.mjs';
10
+ import './chunk-ZBJBQKJ2.mjs';
11
+ import { DEFAULT_VIEW_2D } from './chunk-73Q7ADVL.mjs';
11
12
  import { useIsMobile } from './chunk-P2AOIF7S.mjs';
12
- import { insertStampImage } from './chunk-TQYQVXNW.mjs';
13
+ import { insertStampImage } from './chunk-QGNU34T7.mjs';
13
14
  import './chunk-5UTGXHLJ.mjs';
14
15
  import { forwardRef, useRef, useId, useState, useEffect, useCallback, useImperativeHandle, useLayoutEffect, useMemo } from 'react';
15
16
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
16
17
  import { createPortal } from 'react-dom';
17
18
 
18
- var GeometryIconHeader = /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
19
- /* @__PURE__ */ jsx("polygon", { points: "4,20 20,20 12,5" }),
20
- /* @__PURE__ */ jsx("circle", { cx: "4", cy: "20", r: "1.5", fill: "currentColor", stroke: "none" }),
21
- /* @__PURE__ */ jsx("circle", { cx: "20", cy: "20", r: "1.5", fill: "currentColor", stroke: "none" }),
22
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "1.5", fill: "currentColor", stroke: "none" })
23
- ] });
24
- function UndoIcon() {
25
- return /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
26
- /* @__PURE__ */ jsx("path", { d: "M3 10 L8 5 L8 8 L15 8 A5 5 0 0 1 20 13 L20 16" }),
27
- /* @__PURE__ */ jsx("path", { d: "M3 10 L8 15 L8 12" })
28
- ] });
29
- }
30
- function RedoIcon() {
31
- return /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
32
- /* @__PURE__ */ jsx("path", { d: "M21 10 L16 5 L16 8 L9 8 A5 5 0 0 0 4 13 L4 16" }),
33
- /* @__PURE__ */ jsx("path", { d: "M21 10 L16 15 L16 12" })
34
- ] });
35
- }
36
19
  var C_POINT = "#2563eb";
37
20
  var C_CONSTRUCT = "#dc2626";
38
21
  var C_FILL = "#f59e0b";
@@ -300,6 +283,26 @@ var Icon = {
300
283
  /* @__PURE__ */ jsx("text", { x: "10.5", y: "10.5", fontSize: "8", fontFamily: "serif", fontStyle: "italic", fontWeight: "700", fill: "currentColor", children: "k" })
301
284
  ] })
302
285
  };
286
+ var GeometryIconHeader = /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
287
+ /* @__PURE__ */ jsx("polygon", { points: "4,20 20,20 12,5" }),
288
+ /* @__PURE__ */ jsx("circle", { cx: "4", cy: "20", r: "1.5", fill: "currentColor", stroke: "none" }),
289
+ /* @__PURE__ */ jsx("circle", { cx: "20", cy: "20", r: "1.5", fill: "currentColor", stroke: "none" }),
290
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "1.5", fill: "currentColor", stroke: "none" })
291
+ ] });
292
+ function UndoIcon() {
293
+ return /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
294
+ /* @__PURE__ */ jsx("polyline", { points: "3 7 3 13 9 13" }),
295
+ /* @__PURE__ */ jsx("path", { d: "M3.51 13a9 9 0 1 0 2.13-9.36L3 7" })
296
+ ] });
297
+ }
298
+ function RedoIcon() {
299
+ return /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
300
+ /* @__PURE__ */ jsx("polyline", { points: "21 7 21 13 15 13" }),
301
+ /* @__PURE__ */ jsx("path", { d: "M20.49 13a9 9 0 1 1-2.12-9.36L21 7" })
302
+ ] });
303
+ }
304
+
305
+ // src/stamps/geometry-2d/editor/tools.tsx
303
306
  var TOOLS = [
304
307
  { key: "move", label: "Di chuy\u1EC3n", hint: "K\xE9o \u0111i\u1EC3m ho\u1EB7c xoay n\u1EC1n", icon: Icon.cursor, group: "move", needs: 0 },
305
308
  { key: "select", label: "Ch\u1ECDn", hint: "Click \u0111\u1EC3 ch\u1ECDn 1 / Shift+click \u0111\u1EC3 b\u1ECF th\xEAm / K\xE9o n\u1EC1n \u0111\u1EC3 khoanh v\xF9ng / DEL \u0111\u1EC3 xo\xE1", icon: Icon.select, group: "move", needs: 0 },
@@ -2119,7 +2122,6 @@ var MiniBoard2D = forwardRef(function MiniBoard2D2({ onReady, store, selectedToo
2119
2122
  deleteSelection,
2120
2123
  emitTransform
2121
2124
  }),
2122
- // eslint-disable-next-line react-hooks/exhaustive-deps
2123
2125
  [store, clearSelection, deleteSelection, clearPending, emitTransform]
2124
2126
  );
2125
2127
  return /* @__PURE__ */ jsx(
@@ -3194,5 +3196,5 @@ var GeometryStampHost = forwardRef(
3194
3196
  );
3195
3197
 
3196
3198
  export { GeometryStampHost };
3197
- //# sourceMappingURL=host-EVJT3LIF.mjs.map
3198
- //# sourceMappingURL=host-EVJT3LIF.mjs.map
3199
+ //# sourceMappingURL=host-EPZCNFLH.mjs.map
3200
+ //# sourceMappingURL=host-EPZCNFLH.mjs.map