@mastra/playground-ui 1.0.0-alpha.9 → 1.0.1-alpha.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 (39) hide show
  1. package/dist/components/dynamic-form/default-field-map.d.ts +16 -0
  2. package/dist/components/dynamic-form/fields/array-field.d.ts +17 -0
  3. package/dist/components/dynamic-form/fields/boolean-field.d.ts +12 -0
  4. package/dist/components/dynamic-form/fields/creatable-field.d.ts +17 -0
  5. package/dist/components/dynamic-form/fields/date-field.d.ts +12 -0
  6. package/dist/components/dynamic-form/fields/enum-field.d.ts +16 -0
  7. package/dist/components/dynamic-form/fields/index.d.ts +10 -0
  8. package/dist/components/dynamic-form/fields/number-field.d.ts +12 -0
  9. package/dist/components/dynamic-form/fields/object-field.d.ts +27 -0
  10. package/dist/components/dynamic-form/fields/record-field.d.ts +14 -0
  11. package/dist/components/dynamic-form/fields/string-field.d.ts +14 -0
  12. package/dist/components/dynamic-form/fields/union-field.d.ts +28 -0
  13. package/dist/components/dynamic-form/index.d.ts +11 -0
  14. package/dist/components/dynamic-form/resolvers/index.d.ts +4 -0
  15. package/dist/components/dynamic-form/schema-resolver.d.ts +21 -0
  16. package/dist/components/dynamic-form/schema.d.ts +70 -0
  17. package/dist/components/dynamic-form/utils.d.ts +12 -0
  18. package/dist/components/ui/calendar.d.ts +8 -0
  19. package/dist/components/ui/code-block.d.ts +7 -0
  20. package/dist/components/ui/collapsible.d.ts +5 -0
  21. package/dist/components/ui/command.d.ts +78 -0
  22. package/dist/components/ui/copy-button.d.ts +7 -0
  23. package/dist/components/ui/date-picker.d.ts +23 -0
  24. package/dist/components/ui/label.d.ts +5 -0
  25. package/dist/components/ui/popover.d.ts +6 -0
  26. package/dist/components/ui/select.d.ts +9 -0
  27. package/dist/components/ui/switch.d.ts +4 -0
  28. package/dist/components/ui/textarea.d.ts +5 -0
  29. package/dist/domains/workflows/context/workflow-run-context.d.ts +12 -0
  30. package/dist/domains/workflows/index.d.ts +2 -0
  31. package/dist/domains/workflows/workflow/utils.d.ts +9 -1
  32. package/dist/domains/workflows/workflow/workflow-trigger.d.ts +5 -0
  33. package/dist/hooks/use-copy-to-clipboard.d.ts +9 -0
  34. package/dist/hooks/use-workflows.d.ts +32 -1
  35. package/dist/index.es.js +1730 -77
  36. package/dist/index.es.js.map +1 -1
  37. package/dist/lib/object.d.ts +50 -0
  38. package/dist/lib/string.d.ts +1 -0
  39. package/package.json +37 -22
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Checks if object is empty
3
+ * @param objectName
4
+ * @returns boolean
5
+ */
6
+ export declare const isObjectEmpty: (objectName: Object) => boolean;
7
+ /**
8
+ * Get a value from an object by a given path. This function emulates the behavior of lodash's _.get method.
9
+ *
10
+ * @param {Record<string, any>} object - The object from which to get the value.
11
+ * @param {string | string[]} path - The path to the value in the object. This can be a string (e.g., 'a.b.c') or an array of keys (e.g., ['a', 'b', 'c']).
12
+ * @returns {unknown} The value at the given path in the object, or undefined if the path does not exist.
13
+ */
14
+ export declare const getPath: (object: Record<string, any>, path: string | string[]) => unknown;
15
+ export declare function recordHasData(record: Record<any, any>): boolean;
16
+ export declare function isLiteralObject(a: unknown): boolean;
17
+ export declare const constructObjFromStringPath: (path: string, value: any) => Record<string, any>;
18
+ /**
19
+ * Flatten a nested object, flatten from flat package works - https://www.npmjs.com/package/flat
20
+ * but this allows you to define where you want it to stop by passing the keys that'll exist in the object you want it to stop at
21
+ *
22
+ * @param {Record<string, any>} object - The object to flatten.
23
+ * @param {string[]} endKeys - The keys you want each value (which will be an object in this case) in the flattened object to possible have (e.g., ['a', 'b', 'c']).
24
+ * @param {boolean} flattenArrayValue - This flag indicates that any array value should be flattened to object too.
25
+ * @returns {Record<string, any>} Your flattened object
26
+ */
27
+ export declare const flattenObject: (object: Record<string, any>, endKeys?: string[], flattenArrayValue?: boolean) => Record<string, unknown>;
28
+ type AnyObject = {
29
+ [key: string]: any;
30
+ };
31
+ /**
32
+ * Merges two objects, ensuring that only defined properties from the second object
33
+ * override those in the first object.
34
+ *
35
+ * @template T - The type of the base object.
36
+ * @template U - The type of the overrides object.
37
+ * @param {T} base - The base object whose properties will be overridden.
38
+ * @param {U} overrides - The object containing properties to override in the base object.
39
+ * Only properties that are defined (not `undefined`) will override.
40
+ * @returns {T & U} - A new object that combines properties from both `base` and `overrides`.
41
+ * Properties in `base` will be overridden by defined properties in `overrides`.
42
+ *
43
+ * @example
44
+ * const worksheetData = { a: 1, b: 2, c: 3 };
45
+ * const payload = { b: undefined, c: 4 };
46
+ * const extendedData = mergeWithDefinedOnly(worksheetData, payload);
47
+ * // extendedData = { a: 1, b: 2, c: 4 }
48
+ */
49
+ export declare function mergeWithDefinedOnly<T extends AnyObject, U extends AnyObject>(base: T, overrides: U): T & U;
50
+ export {};
@@ -1 +1,2 @@
1
1
  export declare const lodashTitleCase: (str: string) => string;
2
+ export declare const toTitleCase: (str: string, splitChar?: string) => string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mastra/playground-ui",
3
3
  "type": "module",
4
- "version": "1.0.0-alpha.9",
4
+ "version": "1.0.1-alpha.0",
5
5
  "description": "Mastra Playground components",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
@@ -26,16 +26,23 @@
26
26
  "author": "Mastra",
27
27
  "license": "ISC",
28
28
  "dependencies": {
29
- "@assistant-ui/react": "^0.7.90",
29
+ "@assistant-ui/react": "^0.7.91",
30
30
  "@assistant-ui/react-markdown": "^0.7.21",
31
31
  "@assistant-ui/react-syntax-highlighter": "^0.7.10",
32
32
  "@codemirror/lang-json": "^6.0.1",
33
33
  "@dagrejs/dagre": "^1.1.4",
34
+ "@hookform/resolvers": "^3.9.0",
34
35
  "@lezer/highlight": "^1.2.1",
36
+ "@lukeed/uuid": "^2.0.1",
35
37
  "@radix-ui/react-avatar": "^1.1.3",
36
- "@radix-ui/react-dialog": "^1.1.2",
38
+ "@radix-ui/react-collapsible": "^1.1.3",
39
+ "@radix-ui/react-dialog": "^1.1.6",
40
+ "@radix-ui/react-label": "^2.1.2",
41
+ "@radix-ui/react-popover": "^1.1.6",
37
42
  "@radix-ui/react-scroll-area": "^1.2.3",
43
+ "@radix-ui/react-select": "^2.1.6",
38
44
  "@radix-ui/react-slot": "^1.1.2",
45
+ "@radix-ui/react-switch": "^1.1.2",
39
46
  "@radix-ui/react-tabs": "^1.1.2",
40
47
  "@radix-ui/react-tooltip": "^1.1.8",
41
48
  "@tanstack/react-table": "^8.21.2",
@@ -43,47 +50,55 @@
43
50
  "@uiw/codemirror-theme-github": "^4.23.8",
44
51
  "@uiw/react-codemirror": "^4.23.8",
45
52
  "@xyflow/react": "^12.3.6",
53
+ "cmdk": "^1.0.0",
46
54
  "date-fns": "^4.1.0",
55
+ "json-schema-to-zod": "^2.5.0",
47
56
  "motion": "^12.4.2",
48
57
  "prism-react-renderer": "^2.4.0",
58
+ "react-code-block": "1.1.1",
59
+ "react-day-picker": "^9.6.1",
60
+ "react-hook-form": "^7.53.0",
61
+ "react-markdown": "^9.0.1",
62
+ "react-resizable-panels": "^2.1.7",
63
+ "react-syntax-highlighter": "^15.6.1",
49
64
  "rehype-stringify": "^10.0.1",
50
65
  "remark-gfm": "^4.0.1",
51
66
  "remark-parse": "^11.0.0",
52
67
  "remark-rehype": "^11.1.1",
53
- "react-markdown": "^9.0.1",
54
- "react-resizable-panels": "^2.1.7",
55
- "react-syntax-highlighter": "^15.6.1",
56
- "remeda": "^2.20.1",
57
- "shiki": "^1.24.2",
68
+ "remeda": "^2.21.1",
69
+ "shiki": "^1.29.2",
58
70
  "sonner": "^2.0.1",
59
- "swr": "^2.2.5",
71
+ "superjson": "^2.2.2",
72
+ "swr": "^2.3.3",
60
73
  "tailwindcss-animate": "^1.0.7",
61
74
  "unified": "^11.0.5",
75
+ "use-debounce": "^10.0.4",
76
+ "zod": "^3.24.2",
62
77
  "zustand": "^5.0.3",
63
- "@mastra/client-js": "^0.1.7-alpha.9"
78
+ "@mastra/client-js": "^0.1.8-alpha.0"
64
79
  },
65
80
  "peerDependencies": {
66
81
  "lucide-react": "^0.474.0",
67
82
  "react": ">=19.0.0",
68
83
  "react-dom": ">=19.0.0",
69
84
  "tailwindcss": "^3.0.0",
70
- "@mastra/core": "^0.5.0-alpha.9"
85
+ "@mastra/core": "^0.5.1-alpha.0"
71
86
  },
72
87
  "devDependencies": {
73
- "@types/node": "^22.13.1",
74
- "@types/react": "^19",
75
- "@types/react-dom": "^19",
76
- "@vitejs/plugin-react": "^4.2.1",
77
- "autoprefixer": "^10.4.20",
88
+ "@types/node": "^22.13.10",
89
+ "@types/react": "^19.0.10",
90
+ "@types/react-dom": "^19.0.4",
91
+ "@vitejs/plugin-react": "^4.3.4",
92
+ "autoprefixer": "^10.4.21",
78
93
  "class-variance-authority": "^0.7.1",
79
94
  "clsx": "^2.1.1",
80
- "postcss": "^8.0.0",
95
+ "postcss": "^8.5.3",
81
96
  "rollup-plugin-node-externals": "^8.0.0",
82
- "tailwind-merge": "^3.0.1",
83
- "tailwindcss": "^3.0.0",
84
- "typescript": "^5.7.3",
85
- "vite": "^5.0.0",
86
- "vite-plugin-dts": "^3.7.0",
97
+ "tailwind-merge": "^3.0.2",
98
+ "tailwindcss": "^3.4.17",
99
+ "typescript": "^5.8.2",
100
+ "vite": "^5.4.14",
101
+ "vite-plugin-dts": "^3.9.1",
87
102
  "vite-plugin-lib-inject-css": "^2.2.1"
88
103
  },
89
104
  "scripts": {