@valbuild/ui 0.21.2 → 0.22.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 (70) hide show
  1. package/.storybook/theme.css +5 -1
  2. package/components.json +16 -0
  3. package/dist/valbuild-ui.cjs.d.ts +11 -7
  4. package/dist/valbuild-ui.cjs.js +43607 -33216
  5. package/dist/valbuild-ui.esm.js +48313 -37938
  6. package/fix-server-hack.js +45 -0
  7. package/fullscreen.vite.config.ts +11 -0
  8. package/index.html +13 -0
  9. package/package.json +52 -13
  10. package/server/dist/manifest.json +16 -0
  11. package/server/dist/style.css +2145 -0
  12. package/server/dist/valbuild-ui-main.cjs.js +74441 -0
  13. package/server/dist/valbuild-ui-main.esm.js +74442 -0
  14. package/server/dist/valbuild-ui-server.cjs.js +19 -2
  15. package/server/dist/valbuild-ui-server.esm.js +19 -2
  16. package/server.vite.config.ts +2 -0
  17. package/src/App.tsx +73 -0
  18. package/src/assets/icons/Logo.tsx +103 -0
  19. package/src/components/Button.tsx +10 -2
  20. package/src/components/Dropdown.tsx +2 -2
  21. package/src/components/{dashboard/Grid.stories.tsx → Grid.stories.tsx} +8 -17
  22. package/src/components/{dashboard/Grid.tsx → Grid.tsx} +36 -23
  23. package/src/components/RichTextEditor/ContentEditable.tsx +109 -1
  24. package/src/components/RichTextEditor/Plugins/Toolbar.tsx +2 -2
  25. package/src/components/RichTextEditor/RichTextEditor.tsx +1 -1
  26. package/src/components/ValFormField.tsx +576 -0
  27. package/src/components/ValFullscreen.tsx +1283 -0
  28. package/src/components/ValMenu.tsx +65 -13
  29. package/src/components/ValOverlay.tsx +32 -338
  30. package/src/components/ValWindow.tsx +12 -9
  31. package/src/components/dashboard/FormGroup.tsx +12 -6
  32. package/src/components/dashboard/Tree.tsx +2 -2
  33. package/src/components/ui/accordion.tsx +58 -0
  34. package/src/components/ui/alert-dialog.tsx +139 -0
  35. package/src/components/ui/avatar.tsx +48 -0
  36. package/src/components/ui/button.tsx +56 -0
  37. package/src/components/ui/calendar.tsx +62 -0
  38. package/src/components/ui/card.tsx +86 -0
  39. package/src/components/ui/checkbox.tsx +28 -0
  40. package/src/components/ui/command.tsx +153 -0
  41. package/src/components/ui/dialog.tsx +120 -0
  42. package/src/components/ui/dropdown-menu.tsx +198 -0
  43. package/src/components/ui/form.tsx +177 -0
  44. package/src/components/ui/input.tsx +24 -0
  45. package/src/components/ui/label.tsx +24 -0
  46. package/src/components/ui/popover.tsx +29 -0
  47. package/src/components/ui/progress.tsx +26 -0
  48. package/src/components/ui/radio-group.tsx +42 -0
  49. package/src/components/ui/scroll-area.tsx +51 -0
  50. package/src/components/ui/select.tsx +119 -0
  51. package/src/components/ui/switch.tsx +27 -0
  52. package/src/components/ui/tabs.tsx +53 -0
  53. package/src/components/ui/toggle.tsx +43 -0
  54. package/src/components/ui/tooltip.tsx +28 -0
  55. package/src/components/usePatch.ts +86 -0
  56. package/src/components/useTheme.ts +45 -0
  57. package/src/exports.ts +2 -1
  58. package/src/index.css +96 -60
  59. package/src/lib/IValStore.ts +6 -0
  60. package/src/lib/utils.ts +6 -0
  61. package/src/main.jsx +10 -0
  62. package/src/richtext/conversion/lexicalToRichTextSource.ts +0 -1
  63. package/src/richtext/shadowRootPolyFill.js +115 -0
  64. package/src/server.ts +39 -2
  65. package/src/utils/resolvePath.ts +0 -1
  66. package/src/vite-server.ts +20 -3
  67. package/tailwind.config.js +63 -51
  68. package/tsconfig.json +2 -1
  69. package/vite.config.ts +10 -0
  70. package/src/components/dashboard/ValDashboard.tsx +0 -150
@@ -8,9 +8,11 @@ html {
8
8
  --val-theme-dark-gray: #575757;
9
9
  --val-theme-medium-black: #303030;
10
10
  --val-theme-warm-black: #1a1a1a;
11
- --val-theme-yellow: #ffff00;
11
+ --val-theme-yellow: #38cd98;
12
12
  --val-theme-red: #f02929;
13
13
  --val-theme-green: #1ced1c;
14
+ --val-theme-full-black: black;
15
+ --val-theme-full-white: white;
14
16
 
15
17
  /* light theme */
16
18
  --val-theme-base: var(--val-theme-white);
@@ -18,6 +20,7 @@ html {
18
20
  --val-theme-border: var(--val-theme-medium-gray);
19
21
  --val-theme-fill: var(--val-theme-light-gray);
20
22
  --val-theme-primary: var(--val-theme-warm-black);
23
+ --val-theme-full: var(--val-theme-full-black);
21
24
  }
22
25
 
23
26
  /* dark theme */
@@ -27,4 +30,5 @@ html {
27
30
  --val-theme-border: var(--val-theme-dark-gray);
28
31
  --val-theme-fill: var(--val-theme-medium-black);
29
32
  --val-theme-primary: var(--val-theme-white);
33
+ --val-theme-full: var(--val-theme-full-white);
30
34
  }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "default",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "tailwind.config.js",
8
+ "css": "src/index.css",
9
+ "baseColor": "slate",
10
+ "cssVariables": true
11
+ },
12
+ "aliases": {
13
+ "components": "@/components",
14
+ "utils": "@/lib/utils"
15
+ }
16
+ }
@@ -1,6 +1,6 @@
1
1
  import { LexicalEditor } from 'lexical';
2
2
  import { FC } from 'react';
3
- import { RichTextSource, AnyRichTextOptions, ValApi, RichTextOptions, RichText } from '@valbuild/core';
3
+ import { RichTextSource, AnyRichTextOptions, ModuleId, ValApi, RichTextOptions, RichText } from '@valbuild/core';
4
4
 
5
5
  interface RichTextEditorProps {
6
6
  richtext: RichTextSource<AnyRichTextOptions>;
@@ -8,11 +8,17 @@ interface RichTextEditorProps {
8
8
  }
9
9
  declare const RichTextEditor: FC<RichTextEditorProps>;
10
10
 
11
+ interface IValStore {
12
+ updateAll(): Promise<void>;
13
+ update(moduleIds: ModuleId[]): Promise<void>;
14
+ }
15
+
11
16
  type ValOverlayProps = {
12
17
  defaultTheme?: "dark" | "light";
13
18
  api: ValApi;
19
+ store: IValStore;
14
20
  };
15
- declare function ValOverlay({ defaultTheme, api }: ValOverlayProps): JSX.Element;
21
+ declare function ValOverlay({ defaultTheme, api, store }: ValOverlayProps): JSX.Element;
16
22
 
17
23
  type ImageData = {
18
24
  src: string;
@@ -51,15 +57,13 @@ type Inputs = {
51
57
  };
52
58
  };
53
59
 
54
- interface ValDashboardProps {
55
- showDashboard: boolean;
56
- editMode: boolean;
60
+ interface ValFullscreenProps {
57
61
  valApi: ValApi;
58
62
  }
59
- declare const ValDashboard: FC<ValDashboardProps>;
63
+ declare const ValFullscreen: FC<ValFullscreenProps>;
60
64
 
61
65
  declare function parseRichTextSource<O extends RichTextOptions>({ templateStrings, exprs: nodes, }: RichTextSource<O>): RichText<O>;
62
66
 
63
67
  declare function Style(): JSX.Element;
64
68
 
65
- export { Inputs, RichTextEditor, Style, ValDashboard, ValOverlay, parseRichTextSource };
69
+ export { IValStore, Inputs, RichTextEditor, Style, ValFullscreen, ValOverlay, parseRichTextSource };