@vanduo-oss/vd3-cbun 1.2.0 → 1.3.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 (40) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +16 -14
  3. package/SKILL.md +3 -3
  4. package/dist/charts/index.cjs +18 -8
  5. package/dist/charts/index.cjs.map +2 -2
  6. package/dist/charts/index.d.ts +1 -1
  7. package/dist/charts/index.js +18 -8
  8. package/dist/charts/index.js.map +2 -2
  9. package/dist/charts/vue.d.ts +78 -7
  10. package/dist/code-editor/index.cjs +5 -3
  11. package/dist/code-editor/index.cjs.map +2 -2
  12. package/dist/code-editor/index.js +5 -3
  13. package/dist/code-editor/index.js.map +2 -2
  14. package/dist/draw/core.d.ts +6 -9
  15. package/dist/draw/index.cjs +13 -4
  16. package/dist/draw/index.cjs.map +2 -2
  17. package/dist/draw/index.d.ts +3 -7
  18. package/dist/draw/index.js +13 -4
  19. package/dist/draw/index.js.map +2 -2
  20. package/dist/draw/shapes.d.ts +12 -0
  21. package/dist/flowchart/index.cjs +4 -4
  22. package/dist/flowchart/index.cjs.map +2 -2
  23. package/dist/flowchart/index.js +4 -4
  24. package/dist/flowchart/index.js.map +2 -2
  25. package/dist/hex-grid/index.cjs +90 -62
  26. package/dist/hex-grid/index.cjs.map +3 -3
  27. package/dist/hex-grid/index.d.ts +1 -1
  28. package/dist/hex-grid/index.js +90 -62
  29. package/dist/hex-grid/index.js.map +3 -3
  30. package/dist/hex-grid/vue.d.ts +25 -1
  31. package/dist/index.js +4 -4
  32. package/dist/index.js.map +2 -2
  33. package/dist/meta.json +53 -53
  34. package/dist/music-player/index.cjs +3 -4
  35. package/dist/music-player/index.cjs.map +2 -2
  36. package/dist/music-player/index.d.ts +9 -1
  37. package/dist/music-player/index.js +3 -4
  38. package/dist/music-player/index.js.map +2 -2
  39. package/dist/music-player/vue.d.ts +49 -1
  40. package/package.json +1 -1
@@ -0,0 +1,12 @@
1
+ // Type declarations for the draw geometry/preset module (src/draw/shapes.js).
2
+ // The four public constants below live in shapes.js at runtime; core.js and
3
+ // index.js import them from here. Only the constants re-exported by the ./draw
4
+ // subpath are declared — the module's internal helper functions are not part of
5
+ // the public type surface.
6
+
7
+ import type { DrawTool, DrawShapeType, BrushName, BrushPreset } from './core';
8
+
9
+ export const VD_DRAW_VERSION: string;
10
+ export const DRAW_TOOLS: readonly DrawTool[];
11
+ export const DRAW_SHAPE_TYPES: readonly DrawShapeType[];
12
+ export const BRUSH_PRESETS: Readonly<Record<BrushName, BrushPreset>>;
@@ -227,6 +227,8 @@ var MAX_SCALE = 3;
227
227
  var MIN_NODE_SIZE = 56;
228
228
  var MAX_NODE_SIZE = 420;
229
229
  var WORLD_EXTENT = 12e3;
230
+ var MAX_NODES = 1e4;
231
+ var MAX_EDGES = 1e4;
230
232
  var RESIZE_HANDLES = ["n", "ne", "e", "se", "s", "sw", "w", "nw"];
231
233
  var DEFAULT_EDGE_STROKE_WIDTH = 2.25;
232
234
  var MIN_EDGE_STROKE_WIDTH = 1.25;
@@ -495,12 +497,10 @@ function normalizeDocument(input) {
495
497
  source = {};
496
498
  }
497
499
  const usedNodeIds = /* @__PURE__ */ new Set();
498
- const nodes = (Array.isArray(source.nodes) ? source.nodes : []).map(
499
- (node, index) => normalizeNode(node, index, usedNodeIds)
500
- );
500
+ const nodes = (Array.isArray(source.nodes) ? source.nodes : []).slice(0, MAX_NODES).map((node, index) => normalizeNode(node, index, usedNodeIds));
501
501
  const nodeIds = new Set(nodes.map((node) => node.id));
502
502
  const usedEdgeIds = /* @__PURE__ */ new Set();
503
- const edges = (Array.isArray(source.edges) ? source.edges : []).map((edge, index) => normalizeEdge(edge, index, nodeIds, usedEdgeIds)).filter(Boolean);
503
+ const edges = (Array.isArray(source.edges) ? source.edges : []).slice(0, MAX_EDGES).map((edge, index) => normalizeEdge(edge, index, nodeIds, usedEdgeIds)).filter(Boolean);
504
504
  return {
505
505
  version: VD_FLOWCHART_VERSION,
506
506
  viewport: normalizeViewport(source.viewport),