@valbuild/ui 0.13.4 → 0.17.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 (46) hide show
  1. package/dist/valbuild-ui.cjs.d.ts +13 -18
  2. package/dist/valbuild-ui.cjs.js +7624 -1718
  3. package/dist/valbuild-ui.esm.js +7625 -1719
  4. package/package.json +5 -2
  5. package/src/assets/icons/ImageIcon.tsx +15 -7
  6. package/src/assets/icons/Section.tsx +41 -0
  7. package/src/assets/icons/TextIcon.tsx +20 -0
  8. package/src/components/Button.tsx +18 -7
  9. package/src/components/DraggableList.stories.tsx +20 -0
  10. package/src/components/DraggableList.tsx +95 -0
  11. package/src/components/Dropdown.tsx +2 -0
  12. package/src/components/ExpandLogo.tsx +72 -0
  13. package/src/components/RichTextEditor/Plugins/Toolbar.tsx +1 -16
  14. package/src/components/RichTextEditor/RichTextEditor.tsx +2 -2
  15. package/src/components/User.tsx +17 -0
  16. package/src/components/ValMenu.tsx +40 -0
  17. package/src/components/ValOverlay.tsx +513 -29
  18. package/src/components/ValOverlayContext.tsx +63 -0
  19. package/src/components/ValWindow.stories.tsx +3 -3
  20. package/src/components/ValWindow.tsx +26 -18
  21. package/src/components/dashboard/DashboardButton.tsx +25 -0
  22. package/src/components/dashboard/DashboardDropdown.tsx +59 -0
  23. package/src/components/dashboard/Dropdown.stories.tsx +11 -0
  24. package/src/components/dashboard/Dropdown.tsx +70 -0
  25. package/src/components/dashboard/FormGroup.stories.tsx +37 -0
  26. package/src/components/dashboard/FormGroup.tsx +36 -0
  27. package/src/components/dashboard/Grid.stories.tsx +52 -0
  28. package/src/components/dashboard/Grid.tsx +126 -0
  29. package/src/components/dashboard/Grid2.stories.tsx +56 -0
  30. package/src/components/dashboard/Grid2.tsx +72 -0
  31. package/src/components/dashboard/Tree.stories.tsx +91 -0
  32. package/src/components/dashboard/Tree.tsx +72 -0
  33. package/src/components/dashboard/ValDashboard.tsx +148 -0
  34. package/src/components/dashboard/ValDashboardEditor.tsx +269 -0
  35. package/src/components/dashboard/ValDashboardGrid.tsx +142 -0
  36. package/src/components/dashboard/ValTreeNavigator.tsx +253 -0
  37. package/src/components/forms/Form.tsx +2 -2
  38. package/src/components/forms/{TextForm.tsx → TextArea.tsx} +5 -3
  39. package/src/dto/SerializedSchema.ts +69 -0
  40. package/src/dto/Session.ts +12 -0
  41. package/src/dto/SessionMode.ts +5 -0
  42. package/src/dto/Tree.ts +18 -0
  43. package/src/exports.ts +1 -0
  44. package/src/utils/Remote.ts +15 -0
  45. package/src/utils/resolvePath.ts +33 -0
  46. package/tailwind.config.js +20 -1
@@ -1,6 +1,6 @@
1
1
  import { LexicalEditor } from 'lexical';
2
2
  import { FC } from 'react';
3
- import { RichText } from '@valbuild/core';
3
+ import { RichText, ValApi } from '@valbuild/core';
4
4
 
5
5
  interface RichTextEditorProps {
6
6
  richtext: RichText;
@@ -8,6 +8,12 @@ interface RichTextEditorProps {
8
8
  }
9
9
  declare const RichTextEditor: FC<RichTextEditorProps>;
10
10
 
11
+ type ValOverlayProps = {
12
+ defaultTheme?: "dark" | "light";
13
+ api: ValApi;
14
+ };
15
+ declare function ValOverlay({ defaultTheme, api }: ValOverlayProps): JSX.Element;
16
+
11
17
  type ImageData = {
12
18
  src: string;
13
19
  addMetadata: boolean;
@@ -44,25 +50,14 @@ type Inputs = {
44
50
  data: RichText;
45
51
  };
46
52
  };
47
- type FormProps = {
48
- onSubmit: (nextInputs: Inputs) => void;
49
- inputs: Inputs;
50
- };
51
53
 
52
- type ValWindow = {
53
- position: {
54
- left: number;
55
- top: number;
56
- };
57
- } & FormProps;
58
- type ValOverlayProps = {
54
+ interface ValDashboardProps {
55
+ showDashboard: boolean;
59
56
  editMode: boolean;
60
- setEditMode: (editMode: boolean) => void;
61
- valWindow?: ValWindow;
62
- closeValWindow: () => void;
63
- };
64
- declare function ValOverlay({ editMode, setEditMode, valWindow, closeValWindow, }: ValOverlayProps): JSX.Element;
57
+ valApi: ValApi;
58
+ }
59
+ declare const ValDashboard: FC<ValDashboardProps>;
65
60
 
66
61
  declare function Style(): JSX.Element;
67
62
 
68
- export { Inputs, RichTextEditor, Style, ValOverlay };
63
+ export { Inputs, RichTextEditor, Style, ValDashboard, ValOverlay };