@xom11/whiteboard 0.27.0 → 0.29.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 (67) hide show
  1. package/dist/ai.d.mts +236 -295
  2. package/dist/ai.d.ts +236 -295
  3. package/dist/ai.js +6015 -7577
  4. package/dist/ai.js.map +1 -1
  5. package/dist/ai.mjs +4804 -5426
  6. package/dist/ai.mjs.map +1 -1
  7. package/dist/catalog.json +4 -4
  8. package/dist/{chunk-D5JLJ3PT.mjs → chunk-5JM35CXV.mjs} +4 -4
  9. package/dist/{chunk-D5JLJ3PT.mjs.map → chunk-5JM35CXV.mjs.map} +1 -1
  10. package/dist/{chunk-KYMBUTPO.mjs → chunk-BU5KLO3P.mjs} +3 -3
  11. package/dist/{chunk-KYMBUTPO.mjs.map → chunk-BU5KLO3P.mjs.map} +1 -1
  12. package/dist/{chunk-AJAHD35N.mjs → chunk-E6EDOPGT.mjs} +3 -105
  13. package/dist/chunk-E6EDOPGT.mjs.map +1 -0
  14. package/dist/{chunk-KZGPSTZI.mjs → chunk-GEC2D2EQ.mjs} +4 -4
  15. package/dist/{chunk-KZGPSTZI.mjs.map → chunk-GEC2D2EQ.mjs.map} +1 -1
  16. package/dist/{chunk-AYJPOHCI.mjs → chunk-H22OZYTW.mjs} +3 -3
  17. package/dist/{chunk-AYJPOHCI.mjs.map → chunk-H22OZYTW.mjs.map} +1 -1
  18. package/dist/{chunk-I3L56GVH.mjs → chunk-OQIQNKPQ.mjs} +3 -3
  19. package/dist/{chunk-I3L56GVH.mjs.map → chunk-OQIQNKPQ.mjs.map} +1 -1
  20. package/dist/{chunk-4ETJ4CDY.mjs → chunk-QRUAEXLR.mjs} +4 -4
  21. package/dist/{chunk-4ETJ4CDY.mjs.map → chunk-QRUAEXLR.mjs.map} +1 -1
  22. package/dist/{chunk-HLAOGXEK.mjs → chunk-V3YJ6JFL.mjs} +3 -3
  23. package/dist/{chunk-HLAOGXEK.mjs.map → chunk-V3YJ6JFL.mjs.map} +1 -1
  24. package/dist/{chunk-D5LWSN2Y.mjs → chunk-ZTQBUKLJ.mjs} +30 -13
  25. package/dist/chunk-ZTQBUKLJ.mjs.map +1 -0
  26. package/dist/geometry-2d.d.mts +1 -2
  27. package/dist/geometry-2d.d.ts +1 -2
  28. package/dist/geometry-2d.js +961 -3586
  29. package/dist/geometry-2d.js.map +1 -1
  30. package/dist/geometry-2d.mjs +3 -3
  31. package/dist/geometry-3d.d.mts +1 -2
  32. package/dist/geometry-3d.d.ts +1 -2
  33. package/dist/geometry-3d.js +28 -11
  34. package/dist/geometry-3d.js.map +1 -1
  35. package/dist/geometry-3d.mjs +3 -3
  36. package/dist/graph-2d.d.mts +1 -2
  37. package/dist/graph-2d.d.ts +1 -2
  38. package/dist/graph-2d.js +28 -11
  39. package/dist/graph-2d.js.map +1 -1
  40. package/dist/graph-2d.mjs +3 -3
  41. package/dist/{host-M26FS244.mjs → host-2ISGVO7O.mjs} +5 -5
  42. package/dist/{host-M26FS244.mjs.map → host-2ISGVO7O.mjs.map} +1 -1
  43. package/dist/{host-HAYCJJ2T.mjs → host-HKMZSCIT.mjs} +142 -318
  44. package/dist/host-HKMZSCIT.mjs.map +1 -0
  45. package/dist/{host-LTJHAY5A.mjs → host-HOSJHQ5H.mjs} +6 -6
  46. package/dist/{host-LTJHAY5A.mjs.map → host-HOSJHQ5H.mjs.map} +1 -1
  47. package/dist/index.d.mts +9 -6
  48. package/dist/index.d.ts +9 -6
  49. package/dist/index.js +913 -3540
  50. package/dist/index.js.map +1 -1
  51. package/dist/index.mjs +17 -16
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/latex.d.mts +1 -2
  54. package/dist/latex.d.ts +1 -2
  55. package/dist/serialize-N4G6RFBB.mjs +9 -0
  56. package/dist/{serialize-C3LSUMSA.mjs.map → serialize-N4G6RFBB.mjs.map} +1 -1
  57. package/dist/{types-zc_Pa0mp.d.ts → types-C3FjpoUi.d.mts} +22 -229
  58. package/dist/{types-zc_Pa0mp.d.mts → types-C3FjpoUi.d.ts} +22 -229
  59. package/package.json +1 -9
  60. package/dist/chunk-AJAHD35N.mjs.map +0 -1
  61. package/dist/chunk-D5LWSN2Y.mjs.map +0 -1
  62. package/dist/chunk-T3SOHYB2.mjs +0 -851
  63. package/dist/chunk-T3SOHYB2.mjs.map +0 -1
  64. package/dist/handleExtractProblem-C-U5KluK.d.mts +0 -158
  65. package/dist/handleExtractProblem-C-U5KluK.d.ts +0 -158
  66. package/dist/host-HAYCJJ2T.mjs.map +0 -1
  67. package/dist/serialize-C3LSUMSA.mjs +0 -9
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- export { geometry3dStamp } from './chunk-D5JLJ3PT.mjs';
3
- import './chunk-KYMBUTPO.mjs';
2
+ export { geometry3dStamp } from './chunk-5JM35CXV.mjs';
3
+ import './chunk-BU5KLO3P.mjs';
4
4
  import './chunk-R5FL6S7L.mjs';
5
5
  import './chunk-ICR4CVOE.mjs';
6
- import './chunk-D5LWSN2Y.mjs';
6
+ import './chunk-ZTQBUKLJ.mjs';
7
7
  import './chunk-IHUFOV7L.mjs';
8
8
  import './chunk-73Q7ADVL.mjs';
9
9
  import './chunk-B4NJJZFR.mjs';
@@ -1,5 +1,4 @@
1
- import { B as BaseStampCustomData, S as StampType } from './types-zc_Pa0mp.mjs';
2
- import 'zod';
1
+ import { B as BaseStampCustomData, S as StampType } from './types-C3FjpoUi.mjs';
3
2
  import 'react';
4
3
  import '@excalidraw/excalidraw/element/types';
5
4
 
@@ -1,5 +1,4 @@
1
- import { B as BaseStampCustomData, S as StampType } from './types-zc_Pa0mp.js';
2
- import 'zod';
1
+ import { B as BaseStampCustomData, S as StampType } from './types-C3FjpoUi.js';
3
2
  import 'react';
4
3
  import '@excalidraw/excalidraw/element/types';
5
4
 
package/dist/graph-2d.js CHANGED
@@ -2995,9 +2995,11 @@ var init_circle = __esm({
2995
2995
  },
2996
2996
  render: (obj, ctx) => {
2997
2997
  const board = ctx.jxg;
2998
+ const isCenterLabel = (l) => /^[A-Z]['′]?\d*$/u.test(l);
2999
+ const isCenter = isCenterLabel(obj.label);
2998
3000
  const baseOpts = {
2999
3001
  name: obj.label,
3000
- withLabel: obj.attrs.showLabel ?? false,
3002
+ withLabel: isCenter ? obj.attrs.showLabel ?? false : true,
3001
3003
  strokeColor: obj.attrs.color ?? "#0f172a",
3002
3004
  strokeWidth: obj.attrs.width ?? 2,
3003
3005
  dash: obj.attrs.dash ?? 0,
@@ -3010,22 +3012,37 @@ var init_circle = __esm({
3010
3012
  const p1 = ctx.resolveRef(c.p1);
3011
3013
  const p2 = ctx.resolveRef(c.p2);
3012
3014
  const p3 = ctx.resolveRef(c.p3);
3015
+ if (isCenter) {
3016
+ const center2 = board.create("circumcenter", [p1, p2, p3], {
3017
+ visible: obj.visible,
3018
+ withLabel: true,
3019
+ fixed: true,
3020
+ name: obj.label
3021
+ });
3022
+ const circ = board.create("circumcircle", [p1, p2, p3], { ...baseOpts, withLabel: false });
3023
+ circ.center = circ.center ?? center2;
3024
+ circ._helpers = [center2];
3025
+ return circ;
3026
+ }
3013
3027
  return board.create("circumcircle", [p1, p2, p3], baseOpts);
3014
3028
  }
3015
3029
  if (c?.kind === "incircle") {
3016
3030
  const p1 = ctx.resolveRef(c.p1);
3017
3031
  const p2 = ctx.resolveRef(c.p2);
3018
3032
  const p3 = ctx.resolveRef(c.p3);
3019
- const center2 = board.create("incenter", [p1, p2, p3], {
3020
- visible: obj.visible,
3021
- withLabel: true,
3022
- fixed: true,
3023
- name: obj.label
3024
- });
3025
- const circ = board.create("incircle", [p1, p2, p3], baseOpts);
3026
- circ.center = circ.center ?? center2;
3027
- circ._helpers = [center2];
3028
- return circ;
3033
+ if (isCenter) {
3034
+ const center2 = board.create("incenter", [p1, p2, p3], {
3035
+ visible: obj.visible,
3036
+ withLabel: true,
3037
+ fixed: true,
3038
+ name: obj.label
3039
+ });
3040
+ const circ = board.create("incircle", [p1, p2, p3], { ...baseOpts, withLabel: false });
3041
+ circ.center = circ.center ?? center2;
3042
+ circ._helpers = [center2];
3043
+ return circ;
3044
+ }
3045
+ return board.create("incircle", [p1, p2, p3], baseOpts);
3029
3046
  }
3030
3047
  if (c?.kind === "excircle") {
3031
3048
  const P = [ctx.resolveRef(c.p1), ctx.resolveRef(c.p2), ctx.resolveRef(c.p3)];