@orangecatai/adgen-canvas 0.0.6 → 0.0.7

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 (45) hide show
  1. package/dist/dev/{chunk-CEENA34D.js → chunk-2Q3FNCU4.js} +32 -3
  2. package/dist/dev/chunk-2Q3FNCU4.js.map +7 -0
  3. package/dist/dev/{chunk-7QYIG5FZ.js → chunk-MW637LK5.js} +2 -2
  4. package/dist/dev/data/{image-YK44DYB7.js → image-L2UC5LX5.js} +3 -3
  5. package/dist/dev/index.css +390 -0
  6. package/dist/dev/index.css.map +3 -3
  7. package/dist/dev/index.js +5064 -2278
  8. package/dist/dev/index.js.map +4 -4
  9. package/dist/dev/subset-shared.chunk.js +1 -1
  10. package/dist/dev/subset-worker.chunk.js +1 -1
  11. package/dist/prod/{chunk-R5LMMFAL.js → chunk-7AVPHWG7.js} +1 -1
  12. package/dist/prod/{chunk-GCPOY3UH.js → chunk-XPV36KCI.js} +3 -3
  13. package/dist/prod/data/image-6DWEFZH4.js +1 -0
  14. package/dist/prod/index.css +1 -1
  15. package/dist/prod/index.js +341 -84
  16. package/dist/prod/subset-shared.chunk.js +1 -1
  17. package/dist/prod/subset-worker.chunk.js +1 -1
  18. package/dist/types/excalidraw/components/AIChatPanel.d.ts +10 -1
  19. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  20. package/dist/types/excalidraw/components/ElementCanvasButtons.d.ts +1 -1
  21. package/dist/types/excalidraw/components/FrameToolbar.d.ts +1 -1
  22. package/dist/types/excalidraw/components/HintViewer.d.ts +1 -1
  23. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
  24. package/dist/types/excalidraw/components/Stats/index.d.ts +1 -1
  25. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +1 -0
  26. package/dist/types/excalidraw/components/ToolButton.d.ts +1 -1
  27. package/dist/types/excalidraw/components/ai-chat/agentLoop.d.ts +14 -1
  28. package/dist/types/excalidraw/components/ai-chat/canvasTools.d.ts +234 -1
  29. package/dist/types/excalidraw/components/ai-chat/htmlToExcalidraw.d.ts +53 -0
  30. package/dist/types/excalidraw/components/ai-chat/openRouterStream.d.ts +50 -0
  31. package/dist/types/excalidraw/components/auto-resize/AutoResizePanel.d.ts +16 -0
  32. package/dist/types/excalidraw/components/auto-resize/AutoResizeShimmerLayer.d.ts +7 -0
  33. package/dist/types/excalidraw/components/auto-resize/autoResizeEngine.d.ts +89 -0
  34. package/dist/types/excalidraw/components/auto-resize/autoResizeStore.d.ts +16 -0
  35. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
  36. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
  37. package/dist/types/excalidraw/components/ui/button.d.ts +1 -1
  38. package/dist/types/excalidraw/fonts/Fonts.d.ts +11 -0
  39. package/dist/types/excalidraw/index.d.ts +1 -0
  40. package/dist/types/excalidraw/types.d.ts +96 -0
  41. package/package.json +1 -1
  42. package/dist/dev/chunk-CEENA34D.js.map +0 -7
  43. package/dist/prod/data/image-XZPNP25M.js +0 -1
  44. /package/dist/dev/{chunk-7QYIG5FZ.js.map → chunk-MW637LK5.js.map} +0 -0
  45. /package/dist/dev/data/{image-YK44DYB7.js.map → image-L2UC5LX5.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  define_import_meta_env_default
3
- } from "./chunk-7QYIG5FZ.js";
3
+ } from "./chunk-MW637LK5.js";
4
4
  import {
5
5
  __publicField
6
6
  } from "./chunk-XDFCUUT6.js";
@@ -2891,6 +2891,35 @@ var _Fonts = class _Fonts {
2891
2891
  get registered() {
2892
2892
  return _Fonts.registered;
2893
2893
  }
2894
+ /**
2895
+ * Register a custom font from a URL into the canvas font system.
2896
+ *
2897
+ * Use family IDs >= 1000 to avoid collisions with built-in fonts.
2898
+ *
2899
+ * Note: custom fonts are registered without a weight/style descriptor
2900
+ * because getFontString generates "${size}px ${familyName}" (no weight),
2901
+ * so the browser always requests the normal-weight variant. Pass the font
2902
+ * file that should render by default for this family ID.
2903
+ */
2904
+ static registerCustomFont(spec) {
2905
+ const { familyId, name, url } = spec;
2906
+ if (!_Fonts._registered) {
2907
+ _Fonts._registered = /* @__PURE__ */ new Map();
2908
+ }
2909
+ if (_Fonts._registered.has(familyId)) {
2910
+ return;
2911
+ }
2912
+ const fontFace = new ExcalidrawFontFace(name, url);
2913
+ const metadata = {
2914
+ metrics: {
2915
+ unitsPerEm: 1e3,
2916
+ ascender: 1011,
2917
+ descender: -353,
2918
+ lineHeight: 1.364
2919
+ }
2920
+ };
2921
+ _Fonts._registered.set(familyId, { metadata, fontFaces: [fontFace] });
2922
+ }
2894
2923
  /**
2895
2924
  * Generate CSS @font-face declarations for the given elements.
2896
2925
  */
@@ -5105,7 +5134,7 @@ var parseFileContents = async (blob) => {
5105
5134
  let contents;
5106
5135
  if (blob.type === MIME_TYPES6.png) {
5107
5136
  try {
5108
- return await (await import("./data/image-YK44DYB7.js")).decodePngMetadata(blob);
5137
+ return await (await import("./data/image-L2UC5LX5.js")).decodePngMetadata(blob);
5109
5138
  } catch (error) {
5110
5139
  if (error.message === "INVALID") {
5111
5140
  throw new ImageSceneDataError(
@@ -5561,4 +5590,4 @@ export {
5561
5590
  createFile,
5562
5591
  normalizeFile
5563
5592
  };
5564
- //# sourceMappingURL=chunk-CEENA34D.js.map
5593
+ //# sourceMappingURL=chunk-2Q3FNCU4.js.map