@memberjunction/core-actions 2.108.0 → 2.109.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 (32) hide show
  1. package/dist/custom/ai/find-best-action.action.d.ts +53 -0
  2. package/dist/custom/ai/find-best-action.action.d.ts.map +1 -0
  3. package/dist/custom/ai/find-best-action.action.js +211 -0
  4. package/dist/custom/ai/find-best-action.action.js.map +1 -0
  5. package/dist/custom/visualization/create-svg-chart.action.d.ts.map +1 -1
  6. package/dist/custom/visualization/create-svg-chart.action.js +39 -3
  7. package/dist/custom/visualization/create-svg-chart.action.js.map +1 -1
  8. package/dist/custom/visualization/create-svg-network.action.d.ts.map +1 -1
  9. package/dist/custom/visualization/create-svg-network.action.js +44 -8
  10. package/dist/custom/visualization/create-svg-network.action.js.map +1 -1
  11. package/dist/custom/visualization/create-svg-sketch-diagram.action.d.ts +97 -0
  12. package/dist/custom/visualization/create-svg-sketch-diagram.action.d.ts.map +1 -0
  13. package/dist/custom/visualization/create-svg-sketch-diagram.action.js +730 -0
  14. package/dist/custom/visualization/create-svg-sketch-diagram.action.js.map +1 -0
  15. package/dist/custom/visualization/create-svg-word-cloud.action.d.ts.map +1 -1
  16. package/dist/custom/visualization/create-svg-word-cloud.action.js +166 -91
  17. package/dist/custom/visualization/create-svg-word-cloud.action.js.map +1 -1
  18. package/dist/custom/visualization/shared/svg-types.d.ts +16 -0
  19. package/dist/custom/visualization/shared/svg-types.d.ts.map +1 -1
  20. package/dist/custom/visualization/shared/svg-utils.d.ts +37 -0
  21. package/dist/custom/visualization/shared/svg-utils.d.ts.map +1 -1
  22. package/dist/custom/visualization/shared/svg-utils.js +268 -0
  23. package/dist/custom/visualization/shared/svg-utils.js.map +1 -1
  24. package/dist/generated/action_subclasses.d.ts +10 -10
  25. package/dist/generated/action_subclasses.d.ts.map +1 -1
  26. package/dist/generated/action_subclasses.js +29 -29
  27. package/dist/generated/action_subclasses.js.map +1 -1
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +6 -0
  31. package/dist/index.js.map +1 -1
  32. package/package.json +17 -16
@@ -0,0 +1,97 @@
1
+ import { RunActionParams } from '@memberjunction/actions-base';
2
+ import { BaseAction } from '@memberjunction/actions';
3
+ import { SVGActionResult } from './shared/svg-types';
4
+ /**
5
+ * Action that generates hand-drawn/sketch-style SVG diagrams using Rough.js.
6
+ * Provides informal, whiteboard-style visualizations for brainstorming and presentations.
7
+ *
8
+ * This action supports the same diagram types as Create SVG Diagram but renders them
9
+ * with a sketchy, hand-drawn aesthetic using Rough.js.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * // Sketch flowchart
14
+ * await runAction({
15
+ * ActionName: 'Create SVG Sketch Diagram',
16
+ * Params: [
17
+ * { Name: 'DiagramType', Value: 'flow' },
18
+ * { Name: 'Nodes', Value: JSON.stringify([
19
+ * { id: '1', kind: 'start', label: 'Start' },
20
+ * { id: '2', kind: 'process', label: 'Process' },
21
+ * { id: '3', kind: 'end', label: 'End' }
22
+ * ]) },
23
+ * { Name: 'Edges', Value: JSON.stringify([
24
+ * { from: '1', to: '2' },
25
+ * { from: '2', to: '3' }
26
+ * ]) },
27
+ * { Name: 'Roughness', Value: '1.5' },
28
+ * { Name: 'FillStyle', Value: 'cross-hatch' }
29
+ * ]
30
+ * });
31
+ * ```
32
+ */
33
+ export declare class CreateSVGSketchDiagramAction extends BaseAction {
34
+ /**
35
+ * Generates a hand-drawn style SVG diagram from the provided data and configuration
36
+ *
37
+ * @param params - The action parameters containing:
38
+ * - DiagramType: Type of diagram ('flow' | 'org' | 'er')
39
+ * - Nodes: JSON array or object of nodes
40
+ * - Edges: JSON array of edges (for flow and ER diagrams)
41
+ * - Roughness: Hand-drawn wobble intensity (0.5-3.0, default: 1.5)
42
+ * - FillStyle: Fill pattern ('solid' | 'hachure' | 'cross-hatch' | 'dots', default: 'hachure')
43
+ * - Bowing: Curve intensity for lines (0-5, default: 1)
44
+ * - Direction: Layout direction ('TB' | 'LR' | 'RL' | 'BT') for flow diagrams
45
+ * - Width: Diagram width in pixels (optional, default: 800)
46
+ * - Height: Diagram height in pixels (optional, default: 600)
47
+ * - Title: Diagram title (optional)
48
+ * - Palette: Color palette name (optional)
49
+ * - EnableTooltips: Enable interactive tooltips (optional)
50
+ * - EnablePanZoom: Enable pan and zoom (optional)
51
+ * - WrapWithContainer: Wrap in scrollable container (optional)
52
+ *
53
+ * @returns A promise resolving to an SVGActionResult
54
+ */
55
+ protected InternalRunAction(params: RunActionParams): Promise<SVGActionResult>;
56
+ /**
57
+ * Renders a sketch-style flowchart
58
+ */
59
+ private renderSketchFlow;
60
+ /**
61
+ * Renders a sketch-style org chart
62
+ */
63
+ private renderSketchOrg;
64
+ /**
65
+ * Renders a sketch-style ER diagram
66
+ */
67
+ private renderSketchER;
68
+ /**
69
+ * Gets dimensions for flow node based on kind
70
+ */
71
+ private getNodeDimensions;
72
+ /**
73
+ * Gets color index for node kind
74
+ */
75
+ private getNodeColorIndex;
76
+ /**
77
+ * Adds a title to the SVG
78
+ */
79
+ private addTitle;
80
+ /**
81
+ * Helper to safely parse JSON
82
+ */
83
+ private parseJSON;
84
+ /**
85
+ * Helper to ensure string type
86
+ */
87
+ private ensureString;
88
+ /**
89
+ * Helper to get parameter value by name
90
+ */
91
+ private getParamValue;
92
+ }
93
+ /**
94
+ * Loader function to ensure the CreateSVGSketchDiagramAction class is included in the bundle.
95
+ */
96
+ export declare function LoadCreateSVGSketchDiagramAction(): void;
97
+ //# sourceMappingURL=create-svg-sketch-diagram.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-svg-sketch-diagram.action.d.ts","sourceRoot":"","sources":["../../../src/custom/visualization/create-svg-sketch-diagram.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAMrD,OAAO,EAOH,eAAe,EAGlB,MAAM,oBAAoB,CAAC;AAI5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBACa,4BAA6B,SAAQ,UAAU;IACxD;;;;;;;;;;;;;;;;;;;;OAoBG;cACa,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAoGpF;;OAEG;YACW,gBAAgB;IAgN9B;;OAEG;YACW,eAAe;IA0J7B;;OAEG;YACW,cAAc;IA6M5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAmBzB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAazB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAahB;;OAEG;IACH,OAAO,CAAC,SAAS;IAoBjB;;OAEG;IACH,OAAO,CAAC,YAAY;IAmBpB;;OAEG;IACH,OAAO,CAAC,aAAa;CAQxB;AAED;;GAEG;AACH,wBAAgB,gCAAgC,SAE/C"}