@visualli/core 0.1.2 → 0.1.4

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.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Connection, Container, Node, Meta, Layer } from '@visualli/bindings';
2
- export { Connection, Container, Extension, Layer, Meta, Node, VisualliSpec011 } from '@visualli/bindings';
2
+ export { Connection, Container, Extension, Layer, Meta, Node } from '@visualli/bindings';
3
3
  import * as zustand_vanilla from 'zustand/vanilla';
4
4
 
5
5
  interface MindMapNode {
@@ -278,12 +278,7 @@ declare class VisualliParseError extends Error {
278
278
  * @throws VisualliParseError on malformed input
279
279
  */
280
280
  declare function parseVisualliFile(content: string): VisualliDocument;
281
- /**
282
- * Fetch and parse a .visualli file from a URL.
283
- *
284
- * @throws VisualliParseError | Error
285
- */
286
- declare function loadVisualliFile(url: string): Promise<VisualliDocument>;
281
+ declare function fetchAndParseVisualli(url: string): Promise<VisualliDocument>;
287
282
  /**
288
283
  * Parse .visualli JSONL data as returned from the MongoDB `visualli` field.
289
284
  *
@@ -1044,8 +1039,7 @@ declare function getConnectionsForLayer(doc: VisualliDocument, layerId: string):
1044
1039
  */
1045
1040
  declare function getChildLayerForNode(doc: VisualliDocument, nodeId: string, currentLayerId: string): VisualliLayer | null;
1046
1041
  /**
1047
- * Returns the layer to navigate INTO when double-clicking `nodeId` in `currentLayerId`.
1048
- * Returns null when the node has no child layer.
1042
+ *
1049
1043
  */
1050
1044
  declare function getLayerForNavigation(doc: VisualliDocument, nodeId: string, currentLayerId: string): VisualliLayer | null;
1051
1045
  interface FitResult {
@@ -1178,4 +1172,4 @@ declare function drawBlobPath(ctx: {
1178
1172
  closePath(): void;
1179
1173
  }, radiusX: number, radiusY: number, blobType: number): void;
1180
1174
 
1181
- export { ACTIVE_BLOB_TYPES, ALL_BLOB_SHAPES, ANIMATION_DURATION, ANIMATION_PHASES, BLOB_LAYER_CONFIG, BLOB_TEXT_OFFSETS, BORDER_WIDTH_NORMAL, BORDER_WIDTH_SELECTED, BRAND_COLORS, type BlobPoint, type BlobShape, type BoundingBox, CANVAS_COLORS, CHAR_WIDTH, CIRCULAR_REFERENCE_MAX_DEPTH, CLICK_THRESHOLD, COLOR_BORDER_DARK, COLOR_BORDER_LIGHT, COLOR_DEFAULT_NODE, COLOR_SELECTED, CONTAINER_LABEL_BASE_FONT_PX, COOLDOWN, CORNER_RADIUS, CULLING_QUERY_TIME_BUDGET, type CircularLayoutOptions, type CollisionBox, type ContainerGroupInfo, type CullingOptions, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_RENDER_CONFIG, DESCRIPTION_TEXT_BASE_FONT_PX, DOUBLE_CLICK_DELAY, DRAG_START_DISTANCE, DS_COLORS, DS_RADII, DS_TYPOGRAPHY, EDGE_LABEL_BASE_FONT_PX, type EasingFunction, FEATURE_FLAGS, FONTS, FONT_SIZES, FPSMonitor, FPS_CRITICAL_THRESHOLD, FPS_DOWNGRADE_THRESHOLD, FPS_SAMPLE_WINDOW, FPS_STABILIZATION_FRAMES, FPS_TARGET, FPS_TARGETS, FPS_UPDATE_INTERVAL, FPS_UPGRADE_THRESHOLD, FPS_WARNING_THRESHOLD, type FitResult, type FlatNode, type IRenderConfigStore, type ISelectionStore, type ISpatialIndex, LAYOUT_SPACING, LEVEL_COLORS, LEVEL_COLOR_ARRAY, type LayerConnection, type LayerContainer, type LayerNode, type LinearLayoutOptions, MAX_FRAME_TIME, MAX_NODES, MAX_VISIBLE_NODES, MEMORY_CHECK_INTERVAL, MEMORY_CRITICAL_MB, MEMORY_LIMITS, MEMORY_TARGET_MB, MEMORY_WARNING_MB, MemoryMonitor, type MemoryStats, type MindMapConfig, type MindMapConnection, type MindMapData, type MindMapNode, NODE_COUNT_THRESHOLDS, NODE_HEIGHT, NODE_LAYER_CONFIG, NODE_MIN_WIDTH, NODE_PADDING, NODE_TEXT_BASE_FONT_PX, type NodeMap, type NodeSelection, OPACITY, OVERLAY_FONT_UPPER_BOOST_PX, PARENT_FALLBACK_COLORS, PERFORMANCE_TOAST_COOLDOWN, PerformanceProfiler, QUALITY_HIGH, QUALITY_LEVELS, QUALITY_LOW, QUALITY_MEDIUM, QUALITY_SETTINGS, type QualityLevel, RBUSH_MAX_ENTRIES, RBushSpatialIndex, RENDER_MODES, RESIZE_DEBOUNCE, type RenderConfig, type RenderMode, SCROLL_THROTTLE, SEARCH_DEBOUNCE, SEMANTIC_COLORS, SIMPLIFIED_RENDER_CONFIG, SPACING, SPATIAL_INDEX_BUILD_BUDGET, type SpatialBounds, TARGET_FRAME_TIME, TARGET_ZOOM, TEXT_LABEL_HIDE_BELOW_ZOOM, THEME_COLORS, TIMING_THRESHOLDS, TITLE_MAX_LENGTH, type TopLevelConnection, VIEWPORT_CONFIG, VIEWPORT_FRAMING, VIEWPORT_MARGIN, type ViewportState, type VisualliDocument, type VisualliFragment, type VisualliLayer, type VisualliMeta, VisualliParseError, type VisualliRenderConnection, type VisualliRenderNode, type WorldBounds, ZOOM_DEFAULT, ZOOM_MAX, ZOOM_MIN, ZOOM_NAV_IN_THRESHOLD, ZOOM_NAV_OUT_THRESHOLD, ZOOM_STEP, ZOOM_THRESHOLDS, ZOOM_WHEEL_SENSITIVITY, applyCircularLayout, applyLinearHorizontalLayout, applyLinearVerticalLayout, calculateDistance, calculateFitCenter, calculateFitView, calculateFitZoom, calculateMinimumRadius, calculateOptimalRadiusPercentage, calculateViewportBounds, checkCollision, clampZoom, computeEdgeLabelScale, computeNodeTextScreenScale, computeNodeTextWorldScale, computeOverlayScale, convertLayerToFlatNodes, convertVisualliToFlatNodes, countLayersBeneath, createCubicBezier, createMindMapConfig, darkenHexColor, drawBlobPath, easeInCubic, easeInOutCubic, easeInOutQuart, easeInOutSine, easeOutCubic, easeOutQuad, easeZoomTransition, flattenNodes, focusOnNode, generateSampleConfig, getBlobTypeForLayer, getChildLayerForNode, getChildLayers, getColorForLevel, getConnectionsForLayer, getContainersForLayer, getLayerForNavigation, getNodeBounds, getNodeConnections, getNodesForLayer, getOptimalQualityLevel, getRecommendedRenderConfig, getRenderConfigForQuality, getThemeBackground, getThemeBorder, getThemeText, getTopLevelConnections, getViewportVisibleNodes, getVisibleNodes, isFeatureEnabled, isNodeInViewport, loadVisualliFile, loadVisualliFileFromFile, optimizeLayout, panViewport, parseVisualliFile, parseVisualliFromMongoDB, recalculateViewportBounds, renderConfigStore, resolveCollisions, resolveNodeOverlaps, screenToWorld, selectionStore, setViewportCenter, worldToScreen, zoomViewport };
1175
+ export { ACTIVE_BLOB_TYPES, ALL_BLOB_SHAPES, ANIMATION_DURATION, ANIMATION_PHASES, BLOB_LAYER_CONFIG, BLOB_TEXT_OFFSETS, BORDER_WIDTH_NORMAL, BORDER_WIDTH_SELECTED, BRAND_COLORS, type BlobPoint, type BlobShape, type BoundingBox, CANVAS_COLORS, CHAR_WIDTH, CIRCULAR_REFERENCE_MAX_DEPTH, CLICK_THRESHOLD, COLOR_BORDER_DARK, COLOR_BORDER_LIGHT, COLOR_DEFAULT_NODE, COLOR_SELECTED, CONTAINER_LABEL_BASE_FONT_PX, COOLDOWN, CORNER_RADIUS, CULLING_QUERY_TIME_BUDGET, type CircularLayoutOptions, type CollisionBox, type ContainerGroupInfo, type CullingOptions, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_RENDER_CONFIG, DESCRIPTION_TEXT_BASE_FONT_PX, DOUBLE_CLICK_DELAY, DRAG_START_DISTANCE, DS_COLORS, DS_RADII, DS_TYPOGRAPHY, EDGE_LABEL_BASE_FONT_PX, type EasingFunction, FEATURE_FLAGS, FONTS, FONT_SIZES, FPSMonitor, FPS_CRITICAL_THRESHOLD, FPS_DOWNGRADE_THRESHOLD, FPS_SAMPLE_WINDOW, FPS_STABILIZATION_FRAMES, FPS_TARGET, FPS_TARGETS, FPS_UPDATE_INTERVAL, FPS_UPGRADE_THRESHOLD, FPS_WARNING_THRESHOLD, type FitResult, type FlatNode, type IRenderConfigStore, type ISelectionStore, type ISpatialIndex, LAYOUT_SPACING, LEVEL_COLORS, LEVEL_COLOR_ARRAY, type LayerConnection, type LayerContainer, type LayerNode, type LinearLayoutOptions, MAX_FRAME_TIME, MAX_NODES, MAX_VISIBLE_NODES, MEMORY_CHECK_INTERVAL, MEMORY_CRITICAL_MB, MEMORY_LIMITS, MEMORY_TARGET_MB, MEMORY_WARNING_MB, MemoryMonitor, type MemoryStats, type MindMapConfig, type MindMapConnection, type MindMapData, type MindMapNode, NODE_COUNT_THRESHOLDS, NODE_HEIGHT, NODE_LAYER_CONFIG, NODE_MIN_WIDTH, NODE_PADDING, NODE_TEXT_BASE_FONT_PX, type NodeMap, type NodeSelection, OPACITY, OVERLAY_FONT_UPPER_BOOST_PX, PARENT_FALLBACK_COLORS, PERFORMANCE_TOAST_COOLDOWN, PerformanceProfiler, QUALITY_HIGH, QUALITY_LEVELS, QUALITY_LOW, QUALITY_MEDIUM, QUALITY_SETTINGS, type QualityLevel, RBUSH_MAX_ENTRIES, RBushSpatialIndex, RENDER_MODES, RESIZE_DEBOUNCE, type RenderConfig, type RenderMode, SCROLL_THROTTLE, SEARCH_DEBOUNCE, SEMANTIC_COLORS, SIMPLIFIED_RENDER_CONFIG, SPACING, SPATIAL_INDEX_BUILD_BUDGET, type SpatialBounds, TARGET_FRAME_TIME, TARGET_ZOOM, TEXT_LABEL_HIDE_BELOW_ZOOM, THEME_COLORS, TIMING_THRESHOLDS, TITLE_MAX_LENGTH, type TopLevelConnection, VIEWPORT_CONFIG, VIEWPORT_FRAMING, VIEWPORT_MARGIN, type ViewportState, type VisualliDocument, type VisualliFragment, type VisualliLayer, type VisualliMeta, VisualliParseError, type VisualliRenderConnection, type VisualliRenderNode, type WorldBounds, ZOOM_DEFAULT, ZOOM_MAX, ZOOM_MIN, ZOOM_NAV_IN_THRESHOLD, ZOOM_NAV_OUT_THRESHOLD, ZOOM_STEP, ZOOM_THRESHOLDS, ZOOM_WHEEL_SENSITIVITY, applyCircularLayout, applyLinearHorizontalLayout, applyLinearVerticalLayout, calculateDistance, calculateFitCenter, calculateFitView, calculateFitZoom, calculateMinimumRadius, calculateOptimalRadiusPercentage, calculateViewportBounds, checkCollision, clampZoom, computeEdgeLabelScale, computeNodeTextScreenScale, computeNodeTextWorldScale, computeOverlayScale, convertLayerToFlatNodes, convertVisualliToFlatNodes, countLayersBeneath, createCubicBezier, createMindMapConfig, darkenHexColor, drawBlobPath, easeInCubic, easeInOutCubic, easeInOutQuart, easeInOutSine, easeOutCubic, easeOutQuad, easeZoomTransition, fetchAndParseVisualli, flattenNodes, focusOnNode, generateSampleConfig, getBlobTypeForLayer, getChildLayerForNode, getChildLayers, getColorForLevel, getConnectionsForLayer, getContainersForLayer, getLayerForNavigation, getNodeBounds, getNodeConnections, getNodesForLayer, getOptimalQualityLevel, getRecommendedRenderConfig, getRenderConfigForQuality, getThemeBackground, getThemeBorder, getThemeText, getTopLevelConnections, getViewportVisibleNodes, getVisibleNodes, isFeatureEnabled, isNodeInViewport, loadVisualliFileFromFile, optimizeLayout, panViewport, parseVisualliFile, parseVisualliFromMongoDB, recalculateViewportBounds, renderConfigStore, resolveCollisions, resolveNodeOverlaps, screenToWorld, selectionStore, setViewportCenter, worldToScreen, zoomViewport };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Connection, Container, Node, Meta, Layer } from '@visualli/bindings';
2
- export { Connection, Container, Extension, Layer, Meta, Node, VisualliSpec011 } from '@visualli/bindings';
2
+ export { Connection, Container, Extension, Layer, Meta, Node } from '@visualli/bindings';
3
3
  import * as zustand_vanilla from 'zustand/vanilla';
4
4
 
5
5
  interface MindMapNode {
@@ -278,12 +278,7 @@ declare class VisualliParseError extends Error {
278
278
  * @throws VisualliParseError on malformed input
279
279
  */
280
280
  declare function parseVisualliFile(content: string): VisualliDocument;
281
- /**
282
- * Fetch and parse a .visualli file from a URL.
283
- *
284
- * @throws VisualliParseError | Error
285
- */
286
- declare function loadVisualliFile(url: string): Promise<VisualliDocument>;
281
+ declare function fetchAndParseVisualli(url: string): Promise<VisualliDocument>;
287
282
  /**
288
283
  * Parse .visualli JSONL data as returned from the MongoDB `visualli` field.
289
284
  *
@@ -1044,8 +1039,7 @@ declare function getConnectionsForLayer(doc: VisualliDocument, layerId: string):
1044
1039
  */
1045
1040
  declare function getChildLayerForNode(doc: VisualliDocument, nodeId: string, currentLayerId: string): VisualliLayer | null;
1046
1041
  /**
1047
- * Returns the layer to navigate INTO when double-clicking `nodeId` in `currentLayerId`.
1048
- * Returns null when the node has no child layer.
1042
+ *
1049
1043
  */
1050
1044
  declare function getLayerForNavigation(doc: VisualliDocument, nodeId: string, currentLayerId: string): VisualliLayer | null;
1051
1045
  interface FitResult {
@@ -1178,4 +1172,4 @@ declare function drawBlobPath(ctx: {
1178
1172
  closePath(): void;
1179
1173
  }, radiusX: number, radiusY: number, blobType: number): void;
1180
1174
 
1181
- export { ACTIVE_BLOB_TYPES, ALL_BLOB_SHAPES, ANIMATION_DURATION, ANIMATION_PHASES, BLOB_LAYER_CONFIG, BLOB_TEXT_OFFSETS, BORDER_WIDTH_NORMAL, BORDER_WIDTH_SELECTED, BRAND_COLORS, type BlobPoint, type BlobShape, type BoundingBox, CANVAS_COLORS, CHAR_WIDTH, CIRCULAR_REFERENCE_MAX_DEPTH, CLICK_THRESHOLD, COLOR_BORDER_DARK, COLOR_BORDER_LIGHT, COLOR_DEFAULT_NODE, COLOR_SELECTED, CONTAINER_LABEL_BASE_FONT_PX, COOLDOWN, CORNER_RADIUS, CULLING_QUERY_TIME_BUDGET, type CircularLayoutOptions, type CollisionBox, type ContainerGroupInfo, type CullingOptions, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_RENDER_CONFIG, DESCRIPTION_TEXT_BASE_FONT_PX, DOUBLE_CLICK_DELAY, DRAG_START_DISTANCE, DS_COLORS, DS_RADII, DS_TYPOGRAPHY, EDGE_LABEL_BASE_FONT_PX, type EasingFunction, FEATURE_FLAGS, FONTS, FONT_SIZES, FPSMonitor, FPS_CRITICAL_THRESHOLD, FPS_DOWNGRADE_THRESHOLD, FPS_SAMPLE_WINDOW, FPS_STABILIZATION_FRAMES, FPS_TARGET, FPS_TARGETS, FPS_UPDATE_INTERVAL, FPS_UPGRADE_THRESHOLD, FPS_WARNING_THRESHOLD, type FitResult, type FlatNode, type IRenderConfigStore, type ISelectionStore, type ISpatialIndex, LAYOUT_SPACING, LEVEL_COLORS, LEVEL_COLOR_ARRAY, type LayerConnection, type LayerContainer, type LayerNode, type LinearLayoutOptions, MAX_FRAME_TIME, MAX_NODES, MAX_VISIBLE_NODES, MEMORY_CHECK_INTERVAL, MEMORY_CRITICAL_MB, MEMORY_LIMITS, MEMORY_TARGET_MB, MEMORY_WARNING_MB, MemoryMonitor, type MemoryStats, type MindMapConfig, type MindMapConnection, type MindMapData, type MindMapNode, NODE_COUNT_THRESHOLDS, NODE_HEIGHT, NODE_LAYER_CONFIG, NODE_MIN_WIDTH, NODE_PADDING, NODE_TEXT_BASE_FONT_PX, type NodeMap, type NodeSelection, OPACITY, OVERLAY_FONT_UPPER_BOOST_PX, PARENT_FALLBACK_COLORS, PERFORMANCE_TOAST_COOLDOWN, PerformanceProfiler, QUALITY_HIGH, QUALITY_LEVELS, QUALITY_LOW, QUALITY_MEDIUM, QUALITY_SETTINGS, type QualityLevel, RBUSH_MAX_ENTRIES, RBushSpatialIndex, RENDER_MODES, RESIZE_DEBOUNCE, type RenderConfig, type RenderMode, SCROLL_THROTTLE, SEARCH_DEBOUNCE, SEMANTIC_COLORS, SIMPLIFIED_RENDER_CONFIG, SPACING, SPATIAL_INDEX_BUILD_BUDGET, type SpatialBounds, TARGET_FRAME_TIME, TARGET_ZOOM, TEXT_LABEL_HIDE_BELOW_ZOOM, THEME_COLORS, TIMING_THRESHOLDS, TITLE_MAX_LENGTH, type TopLevelConnection, VIEWPORT_CONFIG, VIEWPORT_FRAMING, VIEWPORT_MARGIN, type ViewportState, type VisualliDocument, type VisualliFragment, type VisualliLayer, type VisualliMeta, VisualliParseError, type VisualliRenderConnection, type VisualliRenderNode, type WorldBounds, ZOOM_DEFAULT, ZOOM_MAX, ZOOM_MIN, ZOOM_NAV_IN_THRESHOLD, ZOOM_NAV_OUT_THRESHOLD, ZOOM_STEP, ZOOM_THRESHOLDS, ZOOM_WHEEL_SENSITIVITY, applyCircularLayout, applyLinearHorizontalLayout, applyLinearVerticalLayout, calculateDistance, calculateFitCenter, calculateFitView, calculateFitZoom, calculateMinimumRadius, calculateOptimalRadiusPercentage, calculateViewportBounds, checkCollision, clampZoom, computeEdgeLabelScale, computeNodeTextScreenScale, computeNodeTextWorldScale, computeOverlayScale, convertLayerToFlatNodes, convertVisualliToFlatNodes, countLayersBeneath, createCubicBezier, createMindMapConfig, darkenHexColor, drawBlobPath, easeInCubic, easeInOutCubic, easeInOutQuart, easeInOutSine, easeOutCubic, easeOutQuad, easeZoomTransition, flattenNodes, focusOnNode, generateSampleConfig, getBlobTypeForLayer, getChildLayerForNode, getChildLayers, getColorForLevel, getConnectionsForLayer, getContainersForLayer, getLayerForNavigation, getNodeBounds, getNodeConnections, getNodesForLayer, getOptimalQualityLevel, getRecommendedRenderConfig, getRenderConfigForQuality, getThemeBackground, getThemeBorder, getThemeText, getTopLevelConnections, getViewportVisibleNodes, getVisibleNodes, isFeatureEnabled, isNodeInViewport, loadVisualliFile, loadVisualliFileFromFile, optimizeLayout, panViewport, parseVisualliFile, parseVisualliFromMongoDB, recalculateViewportBounds, renderConfigStore, resolveCollisions, resolveNodeOverlaps, screenToWorld, selectionStore, setViewportCenter, worldToScreen, zoomViewport };
1175
+ export { ACTIVE_BLOB_TYPES, ALL_BLOB_SHAPES, ANIMATION_DURATION, ANIMATION_PHASES, BLOB_LAYER_CONFIG, BLOB_TEXT_OFFSETS, BORDER_WIDTH_NORMAL, BORDER_WIDTH_SELECTED, BRAND_COLORS, type BlobPoint, type BlobShape, type BoundingBox, CANVAS_COLORS, CHAR_WIDTH, CIRCULAR_REFERENCE_MAX_DEPTH, CLICK_THRESHOLD, COLOR_BORDER_DARK, COLOR_BORDER_LIGHT, COLOR_DEFAULT_NODE, COLOR_SELECTED, CONTAINER_LABEL_BASE_FONT_PX, COOLDOWN, CORNER_RADIUS, CULLING_QUERY_TIME_BUDGET, type CircularLayoutOptions, type CollisionBox, type ContainerGroupInfo, type CullingOptions, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_RENDER_CONFIG, DESCRIPTION_TEXT_BASE_FONT_PX, DOUBLE_CLICK_DELAY, DRAG_START_DISTANCE, DS_COLORS, DS_RADII, DS_TYPOGRAPHY, EDGE_LABEL_BASE_FONT_PX, type EasingFunction, FEATURE_FLAGS, FONTS, FONT_SIZES, FPSMonitor, FPS_CRITICAL_THRESHOLD, FPS_DOWNGRADE_THRESHOLD, FPS_SAMPLE_WINDOW, FPS_STABILIZATION_FRAMES, FPS_TARGET, FPS_TARGETS, FPS_UPDATE_INTERVAL, FPS_UPGRADE_THRESHOLD, FPS_WARNING_THRESHOLD, type FitResult, type FlatNode, type IRenderConfigStore, type ISelectionStore, type ISpatialIndex, LAYOUT_SPACING, LEVEL_COLORS, LEVEL_COLOR_ARRAY, type LayerConnection, type LayerContainer, type LayerNode, type LinearLayoutOptions, MAX_FRAME_TIME, MAX_NODES, MAX_VISIBLE_NODES, MEMORY_CHECK_INTERVAL, MEMORY_CRITICAL_MB, MEMORY_LIMITS, MEMORY_TARGET_MB, MEMORY_WARNING_MB, MemoryMonitor, type MemoryStats, type MindMapConfig, type MindMapConnection, type MindMapData, type MindMapNode, NODE_COUNT_THRESHOLDS, NODE_HEIGHT, NODE_LAYER_CONFIG, NODE_MIN_WIDTH, NODE_PADDING, NODE_TEXT_BASE_FONT_PX, type NodeMap, type NodeSelection, OPACITY, OVERLAY_FONT_UPPER_BOOST_PX, PARENT_FALLBACK_COLORS, PERFORMANCE_TOAST_COOLDOWN, PerformanceProfiler, QUALITY_HIGH, QUALITY_LEVELS, QUALITY_LOW, QUALITY_MEDIUM, QUALITY_SETTINGS, type QualityLevel, RBUSH_MAX_ENTRIES, RBushSpatialIndex, RENDER_MODES, RESIZE_DEBOUNCE, type RenderConfig, type RenderMode, SCROLL_THROTTLE, SEARCH_DEBOUNCE, SEMANTIC_COLORS, SIMPLIFIED_RENDER_CONFIG, SPACING, SPATIAL_INDEX_BUILD_BUDGET, type SpatialBounds, TARGET_FRAME_TIME, TARGET_ZOOM, TEXT_LABEL_HIDE_BELOW_ZOOM, THEME_COLORS, TIMING_THRESHOLDS, TITLE_MAX_LENGTH, type TopLevelConnection, VIEWPORT_CONFIG, VIEWPORT_FRAMING, VIEWPORT_MARGIN, type ViewportState, type VisualliDocument, type VisualliFragment, type VisualliLayer, type VisualliMeta, VisualliParseError, type VisualliRenderConnection, type VisualliRenderNode, type WorldBounds, ZOOM_DEFAULT, ZOOM_MAX, ZOOM_MIN, ZOOM_NAV_IN_THRESHOLD, ZOOM_NAV_OUT_THRESHOLD, ZOOM_STEP, ZOOM_THRESHOLDS, ZOOM_WHEEL_SENSITIVITY, applyCircularLayout, applyLinearHorizontalLayout, applyLinearVerticalLayout, calculateDistance, calculateFitCenter, calculateFitView, calculateFitZoom, calculateMinimumRadius, calculateOptimalRadiusPercentage, calculateViewportBounds, checkCollision, clampZoom, computeEdgeLabelScale, computeNodeTextScreenScale, computeNodeTextWorldScale, computeOverlayScale, convertLayerToFlatNodes, convertVisualliToFlatNodes, countLayersBeneath, createCubicBezier, createMindMapConfig, darkenHexColor, drawBlobPath, easeInCubic, easeInOutCubic, easeInOutQuart, easeInOutSine, easeOutCubic, easeOutQuad, easeZoomTransition, fetchAndParseVisualli, flattenNodes, focusOnNode, generateSampleConfig, getBlobTypeForLayer, getChildLayerForNode, getChildLayers, getColorForLevel, getConnectionsForLayer, getContainersForLayer, getLayerForNavigation, getNodeBounds, getNodeConnections, getNodesForLayer, getOptimalQualityLevel, getRecommendedRenderConfig, getRenderConfigForQuality, getThemeBackground, getThemeBorder, getThemeText, getTopLevelConnections, getViewportVisibleNodes, getVisibleNodes, isFeatureEnabled, isNodeInViewport, loadVisualliFileFromFile, optimizeLayout, panViewport, parseVisualliFile, parseVisualliFromMongoDB, recalculateViewportBounds, renderConfigStore, resolveCollisions, resolveNodeOverlaps, screenToWorld, selectionStore, setViewportCenter, worldToScreen, zoomViewport };
package/dist/index.js CHANGED
@@ -235,7 +235,7 @@ function parseVisualliFile(content) {
235
235
  if (!doc.rootLayer) throw new VisualliParseError("Missing root layer (level 0)");
236
236
  return doc;
237
237
  }
238
- async function loadVisualliFile(url) {
238
+ async function fetchAndParseVisualli(url) {
239
239
  const response = await fetch(url);
240
240
  if (!response.ok) {
241
241
  throw new Error(`HTTP ${response.status}: ${response.statusText}`);
@@ -1460,7 +1460,7 @@ var RBushSpatialIndex = class {
1460
1460
  }
1461
1461
  };
1462
1462
 
1463
- // ../../node_modules/zustand/esm/vanilla.mjs
1463
+ // ../../../../node_modules/zustand/esm/vanilla.mjs
1464
1464
  var createStoreImpl = (createState) => {
1465
1465
  let state;
1466
1466
  const listeners = /* @__PURE__ */ new Set();
@@ -1571,7 +1571,9 @@ function calculateFitCenter(nodes) {
1571
1571
  function getContainersForLayer(doc, layerId) {
1572
1572
  const layer = doc.layers.get(layerId);
1573
1573
  if (!layer) return [];
1574
- return layer.containers.map((c) => {
1574
+ const containers = layer.containers ?? [];
1575
+ if (!Array.isArray(containers)) return [];
1576
+ return containers.map((c) => {
1575
1577
  const label = c.data?.label ?? c.id;
1576
1578
  return { id: c.id, label, nodeIds: c.nodes, level: layer.level };
1577
1579
  });
@@ -2076,6 +2078,7 @@ export {
2076
2078
  easeOutCubic,
2077
2079
  easeOutQuad,
2078
2080
  easeZoomTransition,
2081
+ fetchAndParseVisualli,
2079
2082
  flattenNodes,
2080
2083
  focusOnNode,
2081
2084
  generateSampleConfig,
@@ -2100,7 +2103,6 @@ export {
2100
2103
  getVisibleNodes,
2101
2104
  isFeatureEnabled,
2102
2105
  isNodeInViewport,
2103
- loadVisualliFile,
2104
2106
  loadVisualliFileFromFile,
2105
2107
  optimizeLayout,
2106
2108
  panViewport,