@stacksjs/components 0.2.4 → 0.2.6
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/dist/components/index.d.ts +1 -1
- package/dist/composables/index.d.ts +1 -1
- package/dist/composables/useCopyCode.d.ts +1 -1
- package/dist/composables/useDarkMode.d.ts +1 -1
- package/dist/composables/useSEO.d.ts +2 -2
- package/dist/composables/utilities/index.d.ts +2 -1
- package/dist/composables/utilities/useClickOutside.d.ts +1 -1
- package/dist/composables/utilities/useFocusTrap.d.ts +1 -1
- package/dist/composables/utilities/useKeyboard.d.ts +1 -1
- package/dist/composables/utilities/useLocalStorage.d.ts +2 -2
- package/dist/composables/utilities/useMediaQuery.d.ts +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/ui/accordion/index.d.ts +1 -1
- package/dist/ui/audio/index.d.ts +1 -1
- package/dist/ui/auth/index.d.ts +1 -1
- package/dist/ui/avatar/index.d.ts +1 -1
- package/dist/ui/badge/index.d.ts +1 -1
- package/dist/ui/breadcrumb/index.d.ts +1 -1
- package/dist/ui/button/index.d.ts +3 -3
- package/dist/ui/calendar/index.d.ts +1 -1
- package/dist/ui/card/index.d.ts +1 -1
- package/dist/ui/checkbox/index.d.ts +1 -1
- package/dist/ui/combobox/index.d.ts +1 -1
- package/dist/ui/command-palette/index.d.ts +1 -1
- package/dist/ui/dialog/index.d.ts +1 -1
- package/dist/ui/drawer/index.d.ts +1 -1
- package/dist/ui/dropdown/index.d.ts +1 -1
- package/dist/ui/form/index.d.ts +4 -4
- package/dist/ui/image/index.d.ts +1 -1
- package/dist/ui/input/index.d.ts +7 -7
- package/dist/ui/listbox/index.d.ts +1 -1
- package/dist/ui/navigator/index.d.ts +1 -1
- package/dist/ui/notification/index.d.ts +1 -1
- package/dist/ui/pagination/index.d.ts +1 -1
- package/dist/ui/payment/index.d.ts +1 -1
- package/dist/ui/popover/index.d.ts +1 -1
- package/dist/ui/portal/index.d.ts +1 -1
- package/dist/ui/progress/index.d.ts +1 -1
- package/dist/ui/radio/index.d.ts +1 -1
- package/dist/ui/radio-group/index.d.ts +1 -1
- package/dist/ui/select/index.d.ts +1 -1
- package/dist/ui/sidebar/index.d.ts +2 -2
- package/dist/ui/skeleton/index.d.ts +1 -1
- package/dist/ui/spinner/index.d.ts +1 -1
- package/dist/ui/stepper/index.d.ts +1 -1
- package/dist/ui/storage/index.d.ts +3 -14
- package/dist/ui/switch/index.d.ts +1 -1
- package/dist/ui/table/index.d.ts +1 -1
- package/dist/ui/tabs/index.d.ts +1 -1
- package/dist/ui/teleport/index.d.ts +1 -1
- package/dist/ui/textarea/index.d.ts +1 -1
- package/dist/ui/tooltip/index.d.ts +1 -1
- package/dist/ui/transition/index.d.ts +1 -1
- package/dist/ui/video/index.d.ts +1 -1
- package/dist/ui/virtual-list/index.d.ts +1 -1
- package/dist/ui/virtual-table/index.d.ts +1 -1
- package/dist/utils/accessibility.d.ts +30 -15
- package/dist/utils/animation/easing.d.ts +1 -76
- package/dist/utils/animation/helpers.d.ts +2 -9
- package/dist/utils/animation/index.d.ts +2 -1
- package/dist/utils/animation/keyframes.d.ts +2 -1
- package/dist/utils/error-handling.d.ts +22 -26
- package/dist/utils/highlighter.d.ts +2 -1
- package/dist/utils/i18n.d.ts +3 -30
- package/dist/utils/keep-alive.d.ts +1 -1
- package/dist/utils/lazy-loading.d.ts +2 -2
- package/dist/utils/prop-validation.d.ts +8 -27
- package/dist/utils/theme.d.ts +1 -1
- package/package.json +5 -5
- package/src/composables/utilities/useLocalStorage.ts +4 -4
- package/src/ui/storage/index.ts +1 -1
- package/src/utils/accessibility.ts +1 -1
- package/src/utils/animation/easing.ts +1 -1
- package/src/utils/animation/helpers.ts +1 -1
- package/src/utils/animation/keyframes.ts +1 -1
- package/src/utils/error-handling.ts +1 -1
- package/src/utils/i18n.ts +1 -1
- package/src/utils/lazy-loading.ts +1 -1
- package/src/utils/prop-validation.ts +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as CodeBlock } from './CodeBlock.stx';
|
|
2
2
|
export { default as Footer } from './Footer.stx';
|
|
3
3
|
export { default as Hero } from './Hero.stx';
|
|
4
|
-
export { default as Installation } from './Installation.stx';
|
|
4
|
+
export { default as Installation } from './Installation.stx';
|
|
@@ -5,7 +5,7 @@ export declare function setTitle(title: string, template?: string): void;
|
|
|
5
5
|
/**
|
|
6
6
|
* Set meta tag
|
|
7
7
|
*/
|
|
8
|
-
export declare function setMeta(name: string, content: string, isProperty?:
|
|
8
|
+
export declare function setMeta(name: string, content: string, isProperty?: boolean): void;
|
|
9
9
|
/**
|
|
10
10
|
* Set link tag
|
|
11
11
|
*/
|
|
@@ -33,4 +33,4 @@ export declare interface SEOMetaOptions {
|
|
|
33
33
|
twitterSite?: string
|
|
34
34
|
twitterCreator?: string
|
|
35
35
|
canonical?: string
|
|
36
|
-
}
|
|
36
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function useLocalStorage<T>(key: string, initialValue: T, options?: UseLocalStorageOptions<T>): {
|
|
10
10
|
value: T
|
|
11
|
-
setValue: (newValue: T | ((
|
|
11
|
+
setValue: (newValue: T | ((_prev: T) => T)) => void
|
|
12
12
|
removeValue: () => void
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
@@ -30,4 +30,4 @@ export declare interface UseLocalStorageOptions<T> {
|
|
|
30
30
|
serializer?: (value: T) => string
|
|
31
31
|
deserializer?: (value: string) => T
|
|
32
32
|
onError?: (error: Error) => void
|
|
33
|
-
}
|
|
33
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Types
|
|
2
2
|
export declare interface ComponentProps {
|
|
3
3
|
className?: string
|
|
4
|
+
[key: string]: any
|
|
4
5
|
}
|
|
5
6
|
export declare interface CodeBlockProps extends ComponentProps {
|
|
6
7
|
code: string
|
|
@@ -26,11 +27,14 @@ export declare interface FooterProps extends ComponentProps {
|
|
|
26
27
|
export declare interface InstallationProps extends ComponentProps {
|
|
27
28
|
packageName?: string
|
|
28
29
|
}
|
|
30
|
+
// Export shared components (these will be imported as .stx files)
|
|
29
31
|
export { default as CodeBlock } from './components/CodeBlock.stx';
|
|
30
32
|
export { default as Footer } from './components/Footer.stx';
|
|
31
33
|
export { default as Hero } from './components/Hero.stx';
|
|
32
34
|
export { default as Installation } from './components/Installation.stx';
|
|
35
|
+
// Export composables
|
|
33
36
|
export * from './composables';
|
|
37
|
+
// Export UI components
|
|
34
38
|
export * from './ui/accordion';
|
|
35
39
|
export * from './ui/audio';
|
|
36
40
|
export * from './ui/auth';
|
|
@@ -78,9 +82,10 @@ export * from './ui/virtual-table';
|
|
|
78
82
|
export * from './utils/accessibility';
|
|
79
83
|
export * from './utils/animation';
|
|
80
84
|
export * from './utils/error-handling';
|
|
85
|
+
// Export utilities
|
|
81
86
|
export * from './utils/highlighter';
|
|
82
87
|
export * from './utils/i18n';
|
|
83
88
|
export * from './utils/keep-alive';
|
|
84
89
|
export * from './utils/lazy-loading';
|
|
85
90
|
export * from './utils/prop-validation';
|
|
86
|
-
export * from './utils/theme';
|
|
91
|
+
export * from './utils/theme';
|
package/dist/ui/audio/index.d.ts
CHANGED
package/dist/ui/auth/index.d.ts
CHANGED
|
@@ -26,4 +26,4 @@ export declare interface TwoFactorChallengeProps {
|
|
|
26
26
|
}
|
|
27
27
|
export { default as Login } from './Login.stx';
|
|
28
28
|
export { default as Signup } from './Signup.stx';
|
|
29
|
-
export { default as TwoFactorChallenge } from './TwoFactorChallenge.stx';
|
|
29
|
+
export { default as TwoFactorChallenge } from './TwoFactorChallenge.stx';
|
package/dist/ui/badge/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PropSchema
|
|
1
|
+
import type { PropSchema } from '../../utils/prop-validation';
|
|
2
2
|
/**
|
|
3
3
|
* Create a safe onClick handler that catches and reports errors
|
|
4
4
|
*
|
|
@@ -29,7 +29,7 @@ export declare const buttonPropSchema: PropSchema;
|
|
|
29
29
|
* Validate Button component props
|
|
30
30
|
* Only runs in development mode
|
|
31
31
|
*/
|
|
32
|
-
export declare const validateButtonProps: (props: Record<string, any>)
|
|
32
|
+
export declare const validateButtonProps: (props: Record<string, any>);
|
|
33
33
|
export declare interface ButtonProps {
|
|
34
34
|
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger'
|
|
35
35
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
@@ -42,4 +42,4 @@ export declare interface ButtonProps {
|
|
|
42
42
|
className?: string
|
|
43
43
|
onClick?: (event: Event) => void
|
|
44
44
|
}
|
|
45
|
-
export { default as Button } from './Button.stx';
|
|
45
|
+
export { default as Button } from './Button.stx';
|
package/dist/ui/card/index.d.ts
CHANGED
|
@@ -32,4 +32,4 @@ export { default as Combobox } from './Combobox.stx';
|
|
|
32
32
|
export { default as ComboboxButton } from './ComboboxButton.stx';
|
|
33
33
|
export { default as ComboboxInput } from './ComboboxInput.stx';
|
|
34
34
|
export { default as ComboboxOption } from './ComboboxOption.stx';
|
|
35
|
-
export { default as ComboboxOptions } from './ComboboxOptions.stx';
|
|
35
|
+
export { default as ComboboxOptions } from './ComboboxOptions.stx';
|
|
@@ -10,4 +10,4 @@ export declare interface CommandPaletteItemProps {
|
|
|
10
10
|
onClick?: () => void
|
|
11
11
|
}
|
|
12
12
|
export { default as CommandPalette } from './CommandPalette.stx';
|
|
13
|
-
export { default as CommandPaletteItem } from './CommandPaletteItem.stx';
|
|
13
|
+
export { default as CommandPaletteItem } from './CommandPaletteItem.stx';
|
|
@@ -24,4 +24,4 @@ export { default as Dialog } from './Dialog.stx';
|
|
|
24
24
|
export { default as DialogBackdrop } from './DialogBackdrop.stx';
|
|
25
25
|
export { default as DialogDescription } from './DialogDescription.stx';
|
|
26
26
|
export { default as DialogPanel } from './DialogPanel.stx';
|
|
27
|
-
export { default as DialogTitle } from './DialogTitle.stx';
|
|
27
|
+
export { default as DialogTitle } from './DialogTitle.stx';
|
|
@@ -22,4 +22,4 @@ export declare interface DropdownItemProps {
|
|
|
22
22
|
export { default as Dropdown } from './Dropdown.stx';
|
|
23
23
|
export { default as DropdownButton } from './DropdownButton.stx';
|
|
24
24
|
export { default as DropdownItem } from './DropdownItem.stx';
|
|
25
|
-
export { default as DropdownItems } from './DropdownItems.stx';
|
|
25
|
+
export { default as DropdownItems } from './DropdownItems.stx';
|
package/dist/ui/form/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PropSchema
|
|
1
|
+
import type { PropSchema } from '../../utils/prop-validation';
|
|
2
2
|
/**
|
|
3
3
|
* Form prop validation schema
|
|
4
4
|
*/
|
|
@@ -6,7 +6,7 @@ export declare const formPropSchema: PropSchema;
|
|
|
6
6
|
/**
|
|
7
7
|
* Validate Form component props
|
|
8
8
|
*/
|
|
9
|
-
export declare const validateFormProps: (props: Record<string, any>)
|
|
9
|
+
export declare const validateFormProps: (props: Record<string, any>);
|
|
10
10
|
export declare interface FieldSchema {
|
|
11
11
|
required?: boolean
|
|
12
12
|
requiredMessage?: string
|
|
@@ -19,7 +19,7 @@ export declare interface FieldSchema {
|
|
|
19
19
|
validate?: (value: any, values: Record<string, any>) => string | null | undefined
|
|
20
20
|
}
|
|
21
21
|
export declare interface ValidationSchema {
|
|
22
|
-
|
|
22
|
+
[fieldName: string]: FieldSchema
|
|
23
23
|
}
|
|
24
24
|
export declare interface FormHelpers {
|
|
25
25
|
setErrors: (errors: Record<string, string>) => void
|
|
@@ -45,4 +45,4 @@ export declare interface FieldProps {
|
|
|
45
45
|
onChange: (event: Event) => void
|
|
46
46
|
onBlur: (event: Event) => void
|
|
47
47
|
}
|
|
48
|
-
export { default as Form } from './Form.stx';
|
|
48
|
+
export { default as Form } from './Form.stx';
|
package/dist/ui/image/index.d.ts
CHANGED
package/dist/ui/input/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PropSchema
|
|
1
|
+
import type { PropSchema } from '../../utils/prop-validation';
|
|
2
2
|
/**
|
|
3
3
|
* TextInput prop validation schema
|
|
4
4
|
*/
|
|
@@ -10,23 +10,23 @@ export declare const numberInputPropSchema: PropSchema;
|
|
|
10
10
|
/**
|
|
11
11
|
* Validate TextInput component props
|
|
12
12
|
*/
|
|
13
|
-
export declare const validateTextInputProps: (props: Record<string, any>)
|
|
13
|
+
export declare const validateTextInputProps: (props: Record<string, any>);
|
|
14
14
|
/**
|
|
15
15
|
* Validate EmailInput component props
|
|
16
16
|
*/
|
|
17
|
-
export declare const validateEmailInputProps: (props: Record<string, any>)
|
|
17
|
+
export declare const validateEmailInputProps: (props: Record<string, any>);
|
|
18
18
|
/**
|
|
19
19
|
* Validate PasswordInput component props
|
|
20
20
|
*/
|
|
21
|
-
export declare const validatePasswordInputProps: (props: Record<string, any>)
|
|
21
|
+
export declare const validatePasswordInputProps: (props: Record<string, any>);
|
|
22
22
|
/**
|
|
23
23
|
* Validate NumberInput component props
|
|
24
24
|
*/
|
|
25
|
-
export declare const validateNumberInputProps: (props: Record<string, any>)
|
|
25
|
+
export declare const validateNumberInputProps: (props: Record<string, any>);
|
|
26
26
|
/**
|
|
27
27
|
* Validate SearchInput component props
|
|
28
28
|
*/
|
|
29
|
-
export declare const validateSearchInputProps: (props: Record<string, any>)
|
|
29
|
+
export declare const validateSearchInputProps: (props: Record<string, any>);
|
|
30
30
|
export declare interface BaseInputProps {
|
|
31
31
|
value?: string
|
|
32
32
|
onChange?: (value: string) => void
|
|
@@ -70,4 +70,4 @@ export { default as EmailInput } from './EmailInput.stx';
|
|
|
70
70
|
export { default as NumberInput } from './NumberInput.stx';
|
|
71
71
|
export { default as PasswordInput } from './PasswordInput.stx';
|
|
72
72
|
export { default as SearchInput } from './SearchInput.stx';
|
|
73
|
-
export { default as TextInput } from './TextInput.stx';
|
|
73
|
+
export { default as TextInput } from './TextInput.stx';
|
|
@@ -31,4 +31,4 @@ export { default as Listbox } from './Listbox.stx';
|
|
|
31
31
|
export { default as ListboxButton } from './ListboxButton.stx';
|
|
32
32
|
export { default as ListboxLabel } from './ListboxLabel.stx';
|
|
33
33
|
export { default as ListboxOption } from './ListboxOption.stx';
|
|
34
|
-
export { default as ListboxOptions } from './ListboxOptions.stx';
|
|
34
|
+
export { default as ListboxOptions } from './ListboxOptions.stx';
|
|
@@ -50,4 +50,4 @@ export declare interface CheckoutProps {
|
|
|
50
50
|
export { default as Checkout } from './Checkout.stx';
|
|
51
51
|
export { default as DefaultPaymentMethod } from './DefaultPaymentMethod.stx';
|
|
52
52
|
export { default as PaymentMethods } from './PaymentMethods.stx';
|
|
53
|
-
export { default as SubscriptionCheckout } from './SubscriptionCheckout.stx';
|
|
53
|
+
export { default as SubscriptionCheckout } from './SubscriptionCheckout.stx';
|
|
@@ -16,4 +16,4 @@ export declare interface PopoverPanelProps {
|
|
|
16
16
|
}
|
|
17
17
|
export { default as Popover } from './Popover.stx';
|
|
18
18
|
export { default as PopoverButton } from './PopoverButton.stx';
|
|
19
|
-
export { default as PopoverPanel } from './PopoverPanel.stx';
|
|
19
|
+
export { default as PopoverPanel } from './PopoverPanel.stx';
|
package/dist/ui/radio/index.d.ts
CHANGED
|
@@ -23,4 +23,4 @@ export declare interface RadioGroupDescriptionProps {
|
|
|
23
23
|
export { default as RadioGroup } from './RadioGroup.stx';
|
|
24
24
|
export { default as RadioGroupDescription } from './RadioGroupDescription.stx';
|
|
25
25
|
export { default as RadioGroupLabel } from './RadioGroupLabel.stx';
|
|
26
|
-
export { default as RadioGroupOption } from './RadioGroupOption.stx';
|
|
26
|
+
export { default as RadioGroupOption } from './RadioGroupOption.stx';
|
|
@@ -87,7 +87,7 @@ export declare interface NativeSidebarConfig {
|
|
|
87
87
|
header?: {
|
|
88
88
|
title?: string
|
|
89
89
|
subtitle?: string
|
|
90
|
-
icon?: string
|
|
90
|
+
icon?: string
|
|
91
91
|
}
|
|
92
92
|
searchPlaceholder?: string
|
|
93
93
|
sections: NativeSidebarSection[]
|
|
@@ -126,4 +126,4 @@ export { default as Sidebar } from './Sidebar.stx';
|
|
|
126
126
|
export { default as SidebarSection } from './SidebarSection.stx';
|
|
127
127
|
export { default as SidebarItem } from './SidebarItem.stx';
|
|
128
128
|
export { default as SidebarHeader } from './SidebarHeader.stx';
|
|
129
|
-
export { default as SidebarFooter } from './SidebarFooter.stx';
|
|
129
|
+
export { default as SidebarFooter } from './SidebarFooter.stx';
|
|
@@ -11,23 +11,12 @@ export declare interface StorageOptions {
|
|
|
11
11
|
encrypt?: boolean
|
|
12
12
|
compress?: boolean
|
|
13
13
|
}
|
|
14
|
-
declare type StorageWatchCallback = (
|
|
14
|
+
declare type StorageWatchCallback = (_newValue: any, _oldValue: any, _key: string) => void;
|
|
15
15
|
export declare class StorageManager {
|
|
16
|
-
|
|
17
|
-
private namespace: string;
|
|
18
|
-
private watchers: Map<string, Set<StorageWatchCallback>>;
|
|
19
|
-
private encryptionKey: any;
|
|
20
|
-
constructor(type?: 'local' | 'session', namespace?: any);
|
|
21
|
-
private handleStorageEvent(event: StorageEvent): void;
|
|
22
|
-
private encrypt(data: string): string;
|
|
23
|
-
private decrypt(data: string): string;
|
|
24
|
-
private compress(data: string): string;
|
|
25
|
-
private decompress(data: string): string;
|
|
26
|
-
private getKey(key: string): string;
|
|
16
|
+
constructor(type?: 'local' | 'session', namespace?: string);
|
|
27
17
|
set(key: string, value: any, options?: StorageOptions): void;
|
|
28
18
|
get<T = any>(key: string): T | null;
|
|
29
19
|
watch(key: string, callback: StorageWatchCallback): () => void;
|
|
30
|
-
private notifyWatchers(key: string, newValue: any, oldValue: any): void;
|
|
31
20
|
remove(key: string): void;
|
|
32
21
|
clear(): void;
|
|
33
22
|
has(key: string): boolean;
|
|
@@ -37,4 +26,4 @@ export declare class StorageManager {
|
|
|
37
26
|
setMany(items: Record<string, any>, options?: StorageOptions): void;
|
|
38
27
|
getMany<T = any>(keys: string[]): Record<string, T | null>;
|
|
39
28
|
removeMany(keys: string[]): void;
|
|
40
|
-
}
|
|
29
|
+
}
|
package/dist/ui/table/index.d.ts
CHANGED
|
@@ -26,4 +26,4 @@ export { default as TableBody } from './TableBody.stx';
|
|
|
26
26
|
export { default as TableCell } from './TableCell.stx';
|
|
27
27
|
export { default as TableHead } from './TableHead.stx';
|
|
28
28
|
export { default as TableHeader } from './TableHeader.stx';
|
|
29
|
-
export { default as TableRow } from './TableRow.stx';
|
|
29
|
+
export { default as TableRow } from './TableRow.stx';
|
package/dist/ui/tabs/index.d.ts
CHANGED
package/dist/ui/video/index.d.ts
CHANGED