oasis-editor 0.0.117 → 0.0.119

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.
@@ -0,0 +1,7 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export interface ActionRowProps extends JSX.HTMLAttributes<HTMLDivElement> {
4
+ align?: "start" | "end" | "between";
5
+ wrap?: boolean;
6
+ }
7
+ export declare function ActionRow(props: ActionRowProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { JSX } from 'solid-js';
2
+ import { TextFieldProps } from './TextField.js';
3
+
4
+ export interface ColorFieldProps extends Omit<TextFieldProps, "type" | "onChange"> {
5
+ onChange?: (value: string) => void;
6
+ }
7
+ export declare function ColorField(props: ColorFieldProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export interface FieldGroupProps extends JSX.FieldsetHTMLAttributes<HTMLFieldSetElement> {
4
+ legend?: string;
5
+ legendClass?: string;
6
+ }
7
+ export declare function FieldGroup(props: FieldGroupProps): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export interface FormFieldProps extends JSX.HTMLAttributes<HTMLDivElement> {
4
+ label?: string;
5
+ for?: string;
6
+ description?: string;
7
+ error?: string;
8
+ labelClass?: string;
9
+ }
10
+ export declare function FormField(props: FormFieldProps): JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { JSX, ParentProps } from 'solid-js';
2
+ import { FlexAlign, FlexJustify, FlexWrap, GridOffset, GridSize, ResponsiveValue, SpacingValue, StackDirection } from './layoutTypes.js';
3
+
4
+ export interface GridProps extends ParentProps<JSX.HTMLAttributes<HTMLElement>> {
5
+ container?: boolean;
6
+ size?: ResponsiveValue<GridSize>;
7
+ columns?: ResponsiveValue<number>;
8
+ spacing?: ResponsiveValue<SpacingValue>;
9
+ rowSpacing?: ResponsiveValue<SpacingValue>;
10
+ columnSpacing?: ResponsiveValue<SpacingValue>;
11
+ direction?: ResponsiveValue<StackDirection>;
12
+ offset?: ResponsiveValue<GridOffset>;
13
+ wrap?: ResponsiveValue<FlexWrap>;
14
+ alignItems?: ResponsiveValue<FlexAlign>;
15
+ justifyContent?: ResponsiveValue<FlexJustify>;
16
+ component?: keyof JSX.IntrinsicElements;
17
+ }
18
+ export declare function Grid(props: GridProps): JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export interface HeadingProps extends JSX.HTMLAttributes<HTMLHeadingElement> {
4
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
5
+ }
6
+ export declare function Heading(props: HeadingProps): JSX.Element;
@@ -9,6 +9,8 @@ export interface SelectFieldProps extends Omit<JSX.SelectHTMLAttributes<HTMLSele
9
9
  label?: string;
10
10
  description?: string;
11
11
  error?: string;
12
+ labelClass?: string;
13
+ controlClass?: string;
12
14
  options: SelectFieldOption[];
13
15
  onChange?: (value: string) => void;
14
16
  }
@@ -0,0 +1,13 @@
1
+ import { JSX, ParentProps } from 'solid-js';
2
+ import { FlexAlign, FlexJustify, ResponsiveValue, SpacingValue, StackDirection } from './layoutTypes.js';
3
+
4
+ export interface StackProps extends ParentProps<JSX.HTMLAttributes<HTMLElement>> {
5
+ direction?: ResponsiveValue<StackDirection>;
6
+ spacing?: ResponsiveValue<SpacingValue>;
7
+ divider?: JSX.Element | ((index: number) => JSX.Element);
8
+ useFlexGap?: boolean;
9
+ alignItems?: ResponsiveValue<FlexAlign>;
10
+ justifyContent?: ResponsiveValue<FlexJustify>;
11
+ component?: keyof JSX.IntrinsicElements;
12
+ }
13
+ export declare function Stack(props: StackProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export interface StatusTextProps extends JSX.HTMLAttributes<HTMLSpanElement> {
4
+ tone?: "default" | "muted" | "danger" | "success";
5
+ as?: "span" | "p";
6
+ }
7
+ export declare function StatusText(props: StatusTextProps): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export interface SurfaceButtonProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ icon?: string;
5
+ label?: string;
6
+ variant?: "ghost" | "secondary";
7
+ size?: "sm" | "md";
8
+ active?: boolean;
9
+ }
10
+ export declare function SurfaceButton(props: SurfaceButtonProps): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export interface TextProps extends JSX.HTMLAttributes<HTMLSpanElement> {
4
+ as?: "span" | "p" | "strong";
5
+ tone?: "default" | "muted" | "danger";
6
+ size?: "sm" | "md";
7
+ }
8
+ export declare function Text(props: TextProps): JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export interface TextAreaFieldProps extends Omit<JSX.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
4
+ label?: string;
5
+ description?: string;
6
+ error?: string;
7
+ labelClass?: string;
8
+ controlClass?: string;
9
+ onChange?: (value: string) => void;
10
+ }
11
+ export declare function TextAreaField(props: TextAreaFieldProps): JSX.Element;
@@ -4,6 +4,8 @@ export interface TextFieldProps extends Omit<JSX.InputHTMLAttributes<HTMLInputEl
4
4
  label?: string;
5
5
  description?: string;
6
6
  error?: string;
7
+ labelClass?: string;
8
+ controlClass?: string;
7
9
  onChange?: (value: string) => void;
8
10
  }
9
11
  export declare function TextField(props: TextFieldProps): JSX.Element;
@@ -4,10 +4,31 @@ export { Tabs } from '../components/Tabs/Tabs.js';
4
4
  export type { TabsItem, TabsProps } from '../components/Tabs/Tabs.js';
5
5
  export { Button } from './Button.js';
6
6
  export type { ButtonProps } from './Button.js';
7
+ export { SurfaceButton } from './SurfaceButton.js';
8
+ export type { SurfaceButtonProps } from './SurfaceButton.js';
7
9
  export { IconButton } from './IconButton.js';
8
10
  export type { IconButtonProps } from './IconButton.js';
11
+ export { Text } from './Text.js';
12
+ export type { TextProps } from './Text.js';
13
+ export { Heading } from './Heading.js';
14
+ export type { HeadingProps } from './Heading.js';
15
+ export { StatusText } from './StatusText.js';
16
+ export type { StatusTextProps } from './StatusText.js';
17
+ export { ActionRow } from './ActionRow.js';
18
+ export type { ActionRowProps } from './ActionRow.js';
19
+ export { Stack } from './Stack.js';
20
+ export type { StackProps } from './Stack.js';
21
+ export { Grid } from './Grid.js';
22
+ export type { GridProps } from './Grid.js';
23
+ export type { GridOffset, GridSize, ResponsiveValue } from './layoutTypes.js';
24
+ export { FormField } from './FormField.js';
25
+ export type { FormFieldProps } from './FormField.js';
9
26
  export { TextField } from './TextField.js';
10
27
  export type { TextFieldProps } from './TextField.js';
28
+ export { TextAreaField } from './TextAreaField.js';
29
+ export type { TextAreaFieldProps } from './TextAreaField.js';
30
+ export { ColorField } from './ColorField.js';
31
+ export type { ColorFieldProps } from './ColorField.js';
11
32
  export { Checkbox } from './Checkbox.js';
12
33
  export type { CheckboxProps } from './Checkbox.js';
13
34
  export { SelectField } from './SelectField.js';
@@ -18,6 +39,8 @@ export { Radio, RadioGroup } from './Radio.js';
18
39
  export type { RadioGroupOption, RadioGroupProps, RadioProps } from './Radio.js';
19
40
  export { FieldRow } from './FieldRow.js';
20
41
  export type { FieldRowProps } from './FieldRow.js';
42
+ export { FieldGroup } from './FieldGroup.js';
43
+ export type { FieldGroupProps } from './FieldGroup.js';
21
44
  export { ToggleChip } from './ToggleChip.js';
22
45
  export type { ToggleChipProps } from './ToggleChip.js';
23
46
  export { DialogFooter } from './DialogFooter.js';
@@ -0,0 +1,17 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export type Breakpoint = "xs" | "sm" | "md" | "lg" | "xl";
4
+ export type ResponsiveValue<T> = T | Partial<Record<Breakpoint, T>>;
5
+ export type SpacingValue = number | string;
6
+ export type StackDirection = "row" | "row-reverse" | "column" | "column-reverse";
7
+ export type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
8
+ export type FlexAlign = "flex-start" | "center" | "flex-end" | "stretch" | "baseline";
9
+ export type FlexJustify = "flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly";
10
+ export type GridSize = number | "auto" | "grow" | false;
11
+ export type GridOffset = number | "auto";
12
+ export declare const BREAKPOINTS: Breakpoint[];
13
+ export declare function isResponsiveObject<T>(value: ResponsiveValue<T> | undefined): value is Partial<Record<Breakpoint, T>>;
14
+ export declare function toResponsiveRecord<T>(value: ResponsiveValue<T> | undefined): Partial<Record<Breakpoint, T>>;
15
+ export declare function spacingToCss(value: SpacingValue): string;
16
+ export declare function responsiveCssVars<T>(prefix: string, value: ResponsiveValue<T> | undefined, transform: (value: T) => string): JSX.CSSProperties;
17
+ export declare function mergeStyles(...styles: Array<JSX.CSSProperties | string | undefined>): JSX.CSSProperties | string | undefined;
package/dist/ui.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { Button, Checkbox, ColorPicker, ColorPicker as ToolbarColorPicker, Dialog, DialogFooter, GridPicker, IconButton, Menu, Popover, Select, SelectField, Separator, SplitButton, Tabs, TextField, ToolbarButton, } from '../index.ts';
2
- export type { ButtonProps, CheckboxProps, ColorPickerKind, ColorPickerProps, DialogFooterProps, DialogProps, GridPickerProps, IconButtonProps, MenuProps, PopoverProps, PopoverTriggerApi, SelectFieldOption, SelectFieldProps, SeparatorProps, SplitButtonProps, TabsItem, TabsProps, TextFieldProps, ToolbarButtonProps, ToolbarSelectProps, } from '../index.ts';
1
+ export { ActionRow, Button, Checkbox, ColorField, ColorPicker, ColorPicker as ToolbarColorPicker, Dialog, DialogFooter, FieldGroup, FieldRow, FloatingActionButton, FormField, Grid, GridPicker, Heading, IconButton, Menu, NumberField, Popover, Radio, RadioGroup, Select, SelectField, Separator, SidePanel, SidePanelBody, SidePanelFooter, SidePanelHeader, SplitButton, Stack, StatusText, SurfaceButton, Tabs, Text, TextAreaField, TextField, ToolbarButton, ToggleChip, } from '../index.ts';
2
+ export type { ActionRowProps, ButtonProps, CheckboxProps, ColorFieldProps, ColorPickerKind, ColorPickerProps, DialogFooterProps, DialogProps, FieldGroupProps, FieldRowProps, FloatingActionButtonProps, FormFieldProps, GridOffset, GridPickerProps, GridProps, GridSize, HeadingProps, IconButtonProps, MenuProps, NumberFieldProps, PopoverProps, PopoverTriggerApi, RadioGroupOption, RadioGroupProps, RadioProps, ResponsiveValue, SelectFieldOption, SelectFieldProps, SeparatorProps, SidePanelProps, SidePanelSectionProps, SplitButtonProps, StackProps, StatusTextProps, SurfaceButtonProps, TabsItem, TabsProps, TextAreaFieldProps, TextProps, TextFieldProps, ToolbarButtonProps, ToolbarSelectProps, ToggleChipProps, } from '../index.ts';
package/dist/ui.js CHANGED
@@ -1,20 +1,41 @@
1
- import { Button as r, Checkbox as t, ColorPicker as l, Dialog as i, DialogFooter as a, GridPicker as c, IconButton as n, Menu as k, Popover as u, Select as P, SelectField as b, Separator as p, SplitButton as B, Tabs as C, TextField as S, ToolbarButton as T, ColorPicker as d } from "oasis-editor";
1
+ import { ActionRow as t, Button as i, Checkbox as r, ColorField as l, ColorPicker as a, Dialog as d, DialogFooter as n, FieldGroup as c, FieldRow as u, FloatingActionButton as F, FormField as S, Grid as P, GridPicker as T, Heading as p, IconButton as B, Menu as g, NumberField as k, Popover as x, Radio as C, RadioGroup as b, Select as G, SelectField as R, Separator as m, SidePanel as s, SidePanelBody as A, SidePanelFooter as f, SidePanelHeader as h, SplitButton as w, Stack as D, StatusText as H, SurfaceButton as v, Tabs as y, Text as I, TextAreaField as M, TextField as N, ToggleChip as j, ToolbarButton as q, ColorPicker as z } from "oasis-editor";
2
2
  export {
3
- r as Button,
4
- t as Checkbox,
5
- l as ColorPicker,
6
- i as Dialog,
7
- a as DialogFooter,
8
- c as GridPicker,
9
- n as IconButton,
10
- k as Menu,
11
- u as Popover,
12
- P as Select,
13
- b as SelectField,
14
- p as Separator,
15
- B as SplitButton,
16
- C as Tabs,
17
- S as TextField,
18
- T as ToolbarButton,
19
- d as ToolbarColorPicker
3
+ t as ActionRow,
4
+ i as Button,
5
+ r as Checkbox,
6
+ l as ColorField,
7
+ a as ColorPicker,
8
+ d as Dialog,
9
+ n as DialogFooter,
10
+ c as FieldGroup,
11
+ u as FieldRow,
12
+ F as FloatingActionButton,
13
+ S as FormField,
14
+ P as Grid,
15
+ T as GridPicker,
16
+ p as Heading,
17
+ B as IconButton,
18
+ g as Menu,
19
+ k as NumberField,
20
+ x as Popover,
21
+ C as Radio,
22
+ b as RadioGroup,
23
+ G as Select,
24
+ R as SelectField,
25
+ m as Separator,
26
+ s as SidePanel,
27
+ A as SidePanelBody,
28
+ f as SidePanelFooter,
29
+ h as SidePanelHeader,
30
+ w as SplitButton,
31
+ D as Stack,
32
+ H as StatusText,
33
+ v as SurfaceButton,
34
+ y as Tabs,
35
+ I as Text,
36
+ M as TextAreaField,
37
+ N as TextField,
38
+ j as ToggleChip,
39
+ q as ToolbarButton,
40
+ z as ToolbarColorPicker
20
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.117",
3
+ "version": "0.0.119",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,6 +59,7 @@
59
59
  "test": "vitest run",
60
60
  "test:word-parity": "vitest run --config vitest.word-parity.config.js",
61
61
  "check:imports": "node ./scripts/check-import-graph.mjs",
62
+ "check:native-ui": "node ./scripts/check-native-ui-elements.mjs",
62
63
  "typecheck": "tsc --noEmit",
63
64
  "lint": "eslint src --ext .ts,.tsx",
64
65
  "format": "prettier --write \"src/**/*.{ts,tsx}\""