@valbuild/ui 0.21.1 → 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.
- package/.storybook/theme.css +5 -1
- package/components.json +16 -0
- package/dist/valbuild-ui.cjs.d.ts +11 -7
- package/dist/valbuild-ui.cjs.js +43607 -33217
- package/dist/valbuild-ui.esm.js +48313 -37939
- package/fix-server-hack.js +45 -0
- package/fullscreen.vite.config.ts +11 -0
- package/index.html +13 -0
- package/package.json +52 -13
- package/server/dist/manifest.json +16 -0
- package/server/dist/style.css +2145 -0
- package/server/dist/valbuild-ui-main.cjs.js +74441 -0
- package/server/dist/valbuild-ui-main.esm.js +74442 -0
- package/server/dist/valbuild-ui-server.cjs.js +19 -2
- package/server/dist/valbuild-ui-server.esm.js +19 -2
- package/server.vite.config.ts +2 -0
- package/src/App.tsx +73 -0
- package/src/assets/icons/Logo.tsx +103 -0
- package/src/components/Button.tsx +10 -2
- package/src/components/Dropdown.tsx +2 -2
- package/src/components/{dashboard/Grid.stories.tsx → Grid.stories.tsx} +8 -17
- package/src/components/{dashboard/Grid.tsx → Grid.tsx} +36 -23
- package/src/components/RichTextEditor/ContentEditable.tsx +109 -1
- package/src/components/RichTextEditor/Plugins/Toolbar.tsx +2 -2
- package/src/components/RichTextEditor/RichTextEditor.tsx +1 -1
- package/src/components/ValFormField.tsx +576 -0
- package/src/components/ValFullscreen.tsx +1283 -0
- package/src/components/ValMenu.tsx +65 -13
- package/src/components/ValOverlay.tsx +32 -338
- package/src/components/ValWindow.tsx +12 -9
- package/src/components/dashboard/FormGroup.tsx +12 -6
- package/src/components/dashboard/Tree.tsx +2 -2
- package/src/components/ui/accordion.tsx +58 -0
- package/src/components/ui/alert-dialog.tsx +139 -0
- package/src/components/ui/avatar.tsx +48 -0
- package/src/components/ui/button.tsx +56 -0
- package/src/components/ui/calendar.tsx +62 -0
- package/src/components/ui/card.tsx +86 -0
- package/src/components/ui/checkbox.tsx +28 -0
- package/src/components/ui/command.tsx +153 -0
- package/src/components/ui/dialog.tsx +120 -0
- package/src/components/ui/dropdown-menu.tsx +198 -0
- package/src/components/ui/form.tsx +177 -0
- package/src/components/ui/input.tsx +24 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/popover.tsx +29 -0
- package/src/components/ui/progress.tsx +26 -0
- package/src/components/ui/radio-group.tsx +42 -0
- package/src/components/ui/scroll-area.tsx +51 -0
- package/src/components/ui/select.tsx +119 -0
- package/src/components/ui/switch.tsx +27 -0
- package/src/components/ui/tabs.tsx +53 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +28 -0
- package/src/components/usePatch.ts +86 -0
- package/src/components/useTheme.ts +45 -0
- package/src/exports.ts +2 -1
- package/src/index.css +96 -60
- package/src/lib/IValStore.ts +6 -0
- package/src/lib/utils.ts +6 -0
- package/src/main.jsx +10 -0
- package/src/richtext/conversion/lexicalToRichTextSource.ts +0 -1
- package/src/richtext/conversion/parseRichTextSource.ts +0 -1
- package/src/richtext/shadowRootPolyFill.js +115 -0
- package/src/server.ts +39 -2
- package/src/utils/resolvePath.ts +0 -1
- package/src/vite-server.ts +20 -3
- package/tailwind.config.js +63 -51
- package/tsconfig.json +2 -1
- package/vite.config.ts +10 -0
- package/src/components/dashboard/ValDashboard.tsx +0 -150
package/.storybook/theme.css
CHANGED
|
@@ -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: #
|
|
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
|
}
|
package/components.json
ADDED
|
@@ -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
|
|
55
|
-
showDashboard: boolean;
|
|
56
|
-
editMode: boolean;
|
|
60
|
+
interface ValFullscreenProps {
|
|
57
61
|
valApi: ValApi;
|
|
58
62
|
}
|
|
59
|
-
declare const
|
|
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,
|
|
69
|
+
export { IValStore, Inputs, RichTextEditor, Style, ValFullscreen, ValOverlay, parseRichTextSource };
|