@stacksjs/components 0.2.571 → 0.2.573
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/CodeBlock.d.ts +35 -0
- package/dist/components/Footer.d.ts +12 -0
- package/dist/components/Hero.d.ts +7 -0
- package/dist/components/Installation.d.ts +9 -0
- package/dist/components/index.d.ts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/ui/accordion/Accordion.d.ts +22 -0
- package/dist/ui/accordion/AccordionItem.d.ts +11 -0
- package/dist/ui/accordion/index.d.ts +2 -2
- package/dist/ui/audio/Audio.d.ts +4 -0
- package/dist/ui/audio/index.d.ts +1 -1
- package/dist/ui/auth/Login.d.ts +30 -0
- package/dist/ui/auth/Signup.d.ts +18 -0
- package/dist/ui/auth/TwoFactorChallenge.d.ts +24 -0
- package/dist/ui/auth/index.d.ts +3 -3
- package/dist/ui/avatar/Avatar.d.ts +17 -0
- package/dist/ui/avatar/index.d.ts +1 -1
- package/dist/ui/badge/Badge.d.ts +42 -0
- package/dist/ui/badge/index.d.ts +1 -1
- package/dist/ui/breadcrumb/Breadcrumb.d.ts +13 -0
- package/dist/ui/breadcrumb/index.d.ts +1 -1
- package/dist/ui/button/Button.d.ts +103 -0
- package/dist/ui/button/index.d.ts +1 -1
- package/dist/ui/calendar/Calendar.d.ts +67 -0
- package/dist/ui/calendar/index.d.ts +1 -1
- package/dist/ui/card/Card.d.ts +14 -0
- package/dist/ui/card/index.d.ts +1 -1
- package/dist/ui/chat/ChatInbox.d.ts +15 -0
- package/dist/ui/chat/ChatLauncher.d.ts +8 -0
- package/dist/ui/chat/ChatMessage.d.ts +9 -0
- package/dist/ui/chat/ChatUnreadBadge.d.ts +5 -0
- package/dist/ui/chat/index.d.ts +4 -4
- package/dist/ui/checkbox/Checkbox.d.ts +53 -0
- package/dist/ui/checkbox/index.d.ts +1 -1
- package/dist/ui/combobox/Combobox.d.ts +40 -0
- package/dist/ui/combobox/ComboboxButton.d.ts +13 -0
- package/dist/ui/combobox/ComboboxInput.d.ts +9 -0
- package/dist/ui/combobox/ComboboxOption.d.ts +10 -0
- package/dist/ui/combobox/ComboboxOptions.d.ts +7 -0
- package/dist/ui/combobox/index.d.ts +5 -5
- package/dist/ui/command-palette/CommandPalette.d.ts +13 -0
- package/dist/ui/command-palette/CommandPaletteItem.d.ts +8 -0
- package/dist/ui/command-palette/index.d.ts +2 -2
- package/dist/ui/date-range-picker/DateRangePicker.d.ts +59 -0
- package/dist/ui/date-range-picker/index.d.ts +1 -1
- package/dist/ui/dialog/Dialog.d.ts +31 -0
- package/dist/ui/dialog/DialogBackdrop.d.ts +6 -0
- package/dist/ui/dialog/DialogDescription.d.ts +6 -0
- package/dist/ui/dialog/DialogPanel.d.ts +6 -0
- package/dist/ui/dialog/DialogTitle.d.ts +6 -0
- package/dist/ui/dialog/index.d.ts +5 -5
- package/dist/ui/drawer/Drawer.d.ts +90 -0
- package/dist/ui/drawer/index.d.ts +1 -1
- package/dist/ui/dropdown/Dropdown.d.ts +12 -0
- package/dist/ui/dropdown/DropdownButton.d.ts +8 -0
- package/dist/ui/dropdown/DropdownItem.d.ts +10 -0
- package/dist/ui/dropdown/DropdownItems.d.ts +7 -0
- package/dist/ui/dropdown/index.d.ts +4 -4
- package/dist/ui/empty-state/EmptyState.d.ts +33 -0
- package/dist/ui/empty-state/index.d.ts +1 -1
- package/dist/ui/form/Form.d.ts +31 -0
- package/dist/ui/form/index.d.ts +1 -1
- package/dist/ui/image/Image.d.ts +104 -0
- package/dist/ui/image/index.d.ts +1 -1
- package/dist/ui/input/EmailInput.d.ts +28 -0
- package/dist/ui/input/NumberInput.d.ts +83 -0
- package/dist/ui/input/PasswordInput.d.ts +84 -0
- package/dist/ui/input/SearchInput.d.ts +29 -0
- package/dist/ui/input/TextInput.d.ts +145 -0
- package/dist/ui/input/index.d.ts +17 -5
- package/dist/ui/listbox/Listbox.d.ts +30 -0
- package/dist/ui/listbox/ListboxButton.d.ts +8 -0
- package/dist/ui/listbox/ListboxLabel.d.ts +6 -0
- package/dist/ui/listbox/ListboxOption.d.ts +10 -0
- package/dist/ui/listbox/ListboxOptions.d.ts +7 -0
- package/dist/ui/listbox/index.d.ts +5 -5
- package/dist/ui/mobile/FilterChip.d.ts +35 -0
- package/dist/ui/mobile/FilterChips.d.ts +26 -0
- package/dist/ui/mobile/ListRow.d.ts +35 -0
- package/dist/ui/mobile/NavBar.d.ts +47 -0
- package/dist/ui/mobile/SectionCard.d.ts +38 -0
- package/dist/ui/mobile/TabBar.d.ts +31 -0
- package/dist/ui/mobile/TabBarItem.d.ts +41 -0
- package/dist/ui/mobile/index.d.ts +7 -7
- package/dist/ui/navigator/Navigator.d.ts +14 -0
- package/dist/ui/navigator/index.d.ts +1 -1
- package/dist/ui/notification/Notification.d.ts +22 -0
- package/dist/ui/notification/index.d.ts +1 -1
- package/dist/ui/pager/Pager.d.ts +48 -0
- package/dist/ui/pager/PagerDots.d.ts +22 -0
- package/dist/ui/pager/index.d.ts +2 -2
- package/dist/ui/pagination/Pagination.d.ts +19 -0
- package/dist/ui/pagination/index.d.ts +1 -1
- package/dist/ui/payment/Checkout.d.ts +13 -0
- package/dist/ui/payment/DefaultPaymentMethod.d.ts +8 -0
- package/dist/ui/payment/PaymentMethods.d.ts +23 -0
- package/dist/ui/payment/SubscriptionCheckout.d.ts +28 -0
- package/dist/ui/payment/index.d.ts +4 -4
- package/dist/ui/popover/Popover.d.ts +12 -0
- package/dist/ui/popover/PopoverButton.d.ts +8 -0
- package/dist/ui/popover/PopoverPanel.d.ts +8 -0
- package/dist/ui/popover/index.d.ts +3 -3
- package/dist/ui/portal/Portal.d.ts +7 -0
- package/dist/ui/portal/index.d.ts +1 -1
- package/dist/ui/progress/Progress.d.ts +32 -0
- package/dist/ui/progress/index.d.ts +1 -1
- package/dist/ui/radio/Radio.d.ts +51 -0
- package/dist/ui/radio/index.d.ts +1 -1
- package/dist/ui/radio-group/RadioGroup.d.ts +47 -0
- package/dist/ui/radio-group/RadioGroupDescription.d.ts +6 -0
- package/dist/ui/radio-group/RadioGroupLabel.d.ts +6 -0
- package/dist/ui/radio-group/RadioGroupOption.d.ts +10 -0
- package/dist/ui/radio-group/index.d.ts +4 -4
- package/dist/ui/select/Select.d.ts +93 -0
- package/dist/ui/select/index.d.ts +1 -1
- package/dist/ui/sidebar/Sidebar.d.ts +70 -0
- package/dist/ui/sidebar/SidebarFooter.d.ts +21 -0
- package/dist/ui/sidebar/SidebarHeader.d.ts +114 -0
- package/dist/ui/sidebar/SidebarItem.d.ts +37 -0
- package/dist/ui/sidebar/SidebarPinned.d.ts +27 -0
- package/dist/ui/sidebar/SidebarSection.d.ts +35 -0
- package/dist/ui/sidebar/SidebarSpace.d.ts +44 -0
- package/dist/ui/sidebar/SidebarSpaceSwitcher.d.ts +30 -0
- package/dist/ui/sidebar/SidebarSpaces.d.ts +38 -0
- package/dist/ui/sidebar/index.d.ts +9 -9
- package/dist/ui/sidebar/themes.d.ts +39 -5
- package/dist/ui/skeleton/Skeleton.d.ts +13 -0
- package/dist/ui/skeleton/index.d.ts +1 -1
- package/dist/ui/spinner/Spinner.d.ts +13 -0
- package/dist/ui/spinner/index.d.ts +1 -1
- package/dist/ui/stepper/Stepper.d.ts +8 -0
- package/dist/ui/stepper/StepperStep.d.ts +17 -0
- package/dist/ui/stepper/index.d.ts +2 -2
- package/dist/ui/switch/Switch.d.ts +75 -0
- package/dist/ui/switch/index.d.ts +1 -1
- package/dist/ui/table/Table.d.ts +20 -0
- package/dist/ui/table/TableBody.d.ts +5 -0
- package/dist/ui/table/TableCell.d.ts +5 -0
- package/dist/ui/table/TableHead.d.ts +5 -0
- package/dist/ui/table/TableHeader.d.ts +45 -0
- package/dist/ui/table/TableRow.d.ts +6 -0
- package/dist/ui/table/index.d.ts +6 -6
- package/dist/ui/tabs/Tab.d.ts +19 -0
- package/dist/ui/tabs/TabList.d.ts +34 -0
- package/dist/ui/tabs/TabPanel.d.ts +13 -0
- package/dist/ui/tabs/Tabs.d.ts +30 -0
- package/dist/ui/tabs/index.d.ts +4 -4
- package/dist/ui/teleport/Teleport.d.ts +8 -0
- package/dist/ui/teleport/index.d.ts +1 -1
- package/dist/ui/textarea/Textarea.d.ts +75 -0
- package/dist/ui/textarea/index.d.ts +1 -1
- package/dist/ui/theme-toggle/ThemeToggle.d.ts +53 -0
- package/dist/ui/theme-toggle/index.d.ts +1 -1
- package/dist/ui/tooltip/Tooltip.d.ts +39 -0
- package/dist/ui/tooltip/index.d.ts +1 -1
- package/dist/ui/transition/Transition.d.ts +191 -0
- package/dist/ui/transition/index.d.ts +1 -1
- package/dist/ui/video/Video.d.ts +61 -0
- package/dist/ui/video/index.d.ts +1 -1
- package/dist/ui/virtual-list/VirtualList.d.ts +12 -0
- package/dist/ui/virtual-list/index.d.ts +1 -1
- package/dist/ui/virtual-table/VirtualTable.d.ts +21 -0
- package/dist/ui/virtual-table/index.d.ts +1 -1
- package/dist/utils/accessibility.d.ts +15 -0
- package/dist/utils/error-handling.d.ts +15 -2
- package/dist/utils/i18n.d.ts +48 -65
- package/dist/utils/keep-alive.d.ts +27 -3
- package/dist/utils/lazy-loading.d.ts +5 -1
- package/dist/utils/prop-validation.d.ts +3 -3
- package/dist/utils/tooltip-position.d.ts +7 -1
- package/package.json +4 -7
- package/src/utils/animation/helpers.ts +5 -5
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare function choose(next: unknown): void;
|
|
3
|
+
/*
|
|
4
|
+
* The cycle for the single-button variant: light to dark to system and round.
|
|
5
|
+
* `auto` is the stored spelling and `system` the one people say, and
|
|
6
|
+
* `useColorMode().set` accepts either.
|
|
7
|
+
*/
|
|
8
|
+
declare function cycle(): void;
|
|
9
|
+
declare function isActive(option: unknown): boolean;
|
|
10
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
11
|
+
/*
|
|
12
|
+
* The control four of six apps hand-rolled (stacksjs/stx#1981).
|
|
13
|
+
*
|
|
14
|
+
* `<Sidebar>` already has `followSystemAppearance` and a `theme` prop, so the
|
|
15
|
+
* library had a theme concept and no standalone control to drive it. Every
|
|
16
|
+
* hand-rolled version is the same three states, the same persistence, and the
|
|
17
|
+
* same pre-paint flash to avoid.
|
|
18
|
+
*
|
|
19
|
+
* That last part is why it belongs here, and it is also the part this component
|
|
20
|
+
* does NOT reimplement: `useColorMode()` reads the options the pre-paint boot
|
|
21
|
+
* script published on `window.__STX_COLOR_MODE__` (stacksjs/stx#1794), so the
|
|
22
|
+
* class already on <html> before first paint and the storage key this reads are
|
|
23
|
+
* the same ones. A toggle that picked its own key would undo the theme on
|
|
24
|
+
* hydration - which is the flash, arriving later instead of sooner.
|
|
25
|
+
*/
|
|
26
|
+
export declare const variant: boolean;
|
|
27
|
+
export declare const className: unknown;
|
|
28
|
+
export declare const lightLabel: unknown;
|
|
29
|
+
export declare const darkLabel: unknown;
|
|
30
|
+
export declare const systemLabel: unknown;
|
|
31
|
+
/** Labels are read by assistive tech in `button` variant, where only an icon shows. */
|
|
32
|
+
export declare const showLabels: unknown;
|
|
33
|
+
export declare const groupClasses: unknown;
|
|
34
|
+
export declare const buttonClasses: unknown;
|
|
35
|
+
export declare const optionClasses: 'inline-flex items-center justify-center gap-1.5 px-2.5 py-1.5 text-sm text-fg-soft rounded-control hover:text-fg-strong focus:outline-none focus:ring-2 focus:ring-accent transition-colors';
|
|
36
|
+
export declare const optionActiveClasses: 'inline-flex items-center justify-center gap-1.5 px-2.5 py-1.5 text-sm font-medium text-fg bg-panel shadow-sm rounded-control focus:outline-none focus:ring-2 focus:ring-accent transition-colors';
|
|
37
|
+
declare const labels: {
|
|
38
|
+
light: {};
|
|
39
|
+
dark: {};
|
|
40
|
+
system: {}
|
|
41
|
+
};
|
|
42
|
+
/*
|
|
43
|
+
* `useColorMode()` owns the class on <html>, the storage key and the system
|
|
44
|
+
* media query. This component owns none of that - it is a control, and the
|
|
45
|
+
* preference below is a mirror so the template can react to it.
|
|
46
|
+
*/
|
|
47
|
+
declare const colorMode: unknown;
|
|
48
|
+
declare const preference: ReturnType<typeof state>;
|
|
49
|
+
declare const resolved: ReturnType<typeof state>;
|
|
50
|
+
/** What the single button says it will do, for a screen reader. */
|
|
51
|
+
declare const triggerLabel: ReturnType<typeof derived>;
|
|
52
|
+
declare type __DtsxStxComponentType = DefineComponent<{ variant?: unknown, className?: string, lightLabel?: string, darkLabel?: string, systemLabel?: string, showLabels?: unknown }> & { readonly __stxExposed?: { preference: typeof preference, resolved: typeof resolved, choose: typeof choose, cycle: typeof cycle, isActive: typeof isActive, triggerLabel: typeof triggerLabel } }
|
|
53
|
+
export default __dtsx_component__;
|
|
@@ -7,4 +7,4 @@ export declare interface ThemeToggleProps {
|
|
|
7
7
|
className?: string
|
|
8
8
|
onChange?: (state: { preference: 'light' | 'dark' | 'auto', mode: 'light' | 'dark' }) => void
|
|
9
9
|
}
|
|
10
|
-
export { default as ThemeToggle } from './ThemeToggle
|
|
10
|
+
export { default as ThemeToggle } from './ThemeToggle';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const content: unknown;
|
|
4
|
+
export declare const position: unknown;
|
|
5
|
+
export declare const delay: unknown;
|
|
6
|
+
export declare const className: unknown;
|
|
7
|
+
export declare const show: ReturnType<typeof $bool>;
|
|
8
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
9
|
+
/*
|
|
10
|
+
* The id that makes the tooltip reachable from its trigger.
|
|
11
|
+
*
|
|
12
|
+
* `role="tooltip"` names what the element IS; it does not attach it to
|
|
13
|
+
* anything. Without `aria-describedby` on the trigger pointing here, a screen
|
|
14
|
+
* reader never reaches this element at all and the role announces nothing --
|
|
15
|
+
* so the component was a DOWNGRADE from the native `title=` it replaces, which
|
|
16
|
+
* at least is announced.
|
|
17
|
+
*/
|
|
18
|
+
export declare const tooltipId: string;
|
|
19
|
+
/*
|
|
20
|
+
* Whether the text may wrap. It may, by default.
|
|
21
|
+
*
|
|
22
|
+
* `whitespace-nowrap` keeps a two-word hint on one line, which is what a
|
|
23
|
+
* tooltip usually is -- but a sentence-length one then grows past the viewport
|
|
24
|
+
* instead of wrapping, and on a phone the end of it is simply unreachable.
|
|
25
|
+
* Wrapping with a sensible max width is right for both; `nowrap` is there for
|
|
26
|
+
* a caller who knows the content is short.
|
|
27
|
+
*/
|
|
28
|
+
export declare const nowrap: ReturnType<typeof $bool>;
|
|
29
|
+
/*
|
|
30
|
+
* No `pointer-events-none`: WCAG 2.1 SC 1.4.13 requires content shown on hover
|
|
31
|
+
* to stay visible while the pointer is over it. With the pointer locked out,
|
|
32
|
+
* moving toward the tooltip to read it dismissed it -- worst for exactly the
|
|
33
|
+
* long tooltips that are hardest to read quickly. The panel takes its own
|
|
34
|
+
* mouseenter/mouseleave below so entering it keeps it open.
|
|
35
|
+
*/
|
|
36
|
+
export declare const tooltipClasses: unknown;
|
|
37
|
+
export declare const arrowClass: unknown;
|
|
38
|
+
declare type __DtsxStxComponentType = DefineComponent<{ content?: string, position?: string, delay?: unknown, className?: string, show?: unknown, disabled?: unknown, nowrap?: unknown }>;
|
|
39
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare function setShow(next: unknown): undefined;
|
|
3
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
4
|
+
export declare const show: unknown;
|
|
5
|
+
export declare const enter: unknown;
|
|
6
|
+
export declare const enterFrom: unknown;
|
|
7
|
+
export declare const enterTo: unknown;
|
|
8
|
+
export declare const leave: unknown;
|
|
9
|
+
export declare const leaveFrom: unknown;
|
|
10
|
+
export declare const leaveTo: unknown;
|
|
11
|
+
export declare const appear: ReturnType<typeof $bool>;
|
|
12
|
+
export declare const duration: unknown;
|
|
13
|
+
export declare const delay: unknown;
|
|
14
|
+
export declare const preset: unknown;
|
|
15
|
+
export declare const className: unknown;
|
|
16
|
+
/**
|
|
17
|
+
* @defaultValue
|
|
18
|
+
* ```ts
|
|
19
|
+
* {
|
|
20
|
+
* fade: {
|
|
21
|
+
* enter: 'transition-opacity',
|
|
22
|
+
* enterFrom: 'opacity-0',
|
|
23
|
+
* enterTo: 'opacity-100',
|
|
24
|
+
* leave: 'transition-opacity',
|
|
25
|
+
* leaveFrom: 'opacity-100',
|
|
26
|
+
* leaveTo: 'opacity-0'
|
|
27
|
+
* },
|
|
28
|
+
* slide: {
|
|
29
|
+
* enter: 'transition-transform',
|
|
30
|
+
* enterFrom: 'translate-y-2',
|
|
31
|
+
* enterTo: 'translate-y-0',
|
|
32
|
+
* leave: 'transition-transform',
|
|
33
|
+
* leaveFrom: 'translate-y-0',
|
|
34
|
+
* leaveTo: 'translate-y-2'
|
|
35
|
+
* },
|
|
36
|
+
* slideLeft: {
|
|
37
|
+
* enter: 'transition-transform',
|
|
38
|
+
* enterFrom: 'translate-x-full',
|
|
39
|
+
* enterTo: 'translate-x-0',
|
|
40
|
+
* leave: 'transition-transform',
|
|
41
|
+
* leaveFrom: 'translate-x-0',
|
|
42
|
+
* leaveTo: '-translate-x-full'
|
|
43
|
+
* },
|
|
44
|
+
* slideRight: {
|
|
45
|
+
* enter: 'transition-transform',
|
|
46
|
+
* enterFrom: '-translate-x-full',
|
|
47
|
+
* enterTo: 'translate-x-0',
|
|
48
|
+
* leave: 'transition-transform',
|
|
49
|
+
* leaveFrom: 'translate-x-0',
|
|
50
|
+
* leaveTo: 'translate-x-full'
|
|
51
|
+
* },
|
|
52
|
+
* scale: {
|
|
53
|
+
* enter: 'transition-transform',
|
|
54
|
+
* enterFrom: 'scale-95',
|
|
55
|
+
* enterTo: 'scale-100',
|
|
56
|
+
* leave: 'transition-transform',
|
|
57
|
+
* leaveFrom: 'scale-100',
|
|
58
|
+
* leaveTo: 'scale-95'
|
|
59
|
+
* },
|
|
60
|
+
* rotate: {
|
|
61
|
+
* enter: 'transition-transform',
|
|
62
|
+
* enterFrom: 'rotate-12 scale-95',
|
|
63
|
+
* enterTo: 'rotate-0 scale-100',
|
|
64
|
+
* leave: 'transition-transform',
|
|
65
|
+
* leaveFrom: 'rotate-0 scale-100',
|
|
66
|
+
* leaveTo: '-rotate-12 scale-95'
|
|
67
|
+
* },
|
|
68
|
+
* zoom: {
|
|
69
|
+
* enter: 'transition-all',
|
|
70
|
+
* enterFrom: 'scale-0 opacity-0',
|
|
71
|
+
* enterTo: 'scale-100 opacity-100',
|
|
72
|
+
* leave: 'transition-all',
|
|
73
|
+
* leaveFrom: 'scale-100 opacity-100',
|
|
74
|
+
* leaveTo: 'scale-0 opacity-0'
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
declare const presets: {
|
|
80
|
+
fade: {
|
|
81
|
+
/** @defaultValue 'transition-opacity' */
|
|
82
|
+
enter: string;
|
|
83
|
+
/** @defaultValue 'opacity-0' */
|
|
84
|
+
enterFrom: string;
|
|
85
|
+
/** @defaultValue 'opacity-100' */
|
|
86
|
+
enterTo: string;
|
|
87
|
+
/** @defaultValue 'transition-opacity' */
|
|
88
|
+
leave: string;
|
|
89
|
+
/** @defaultValue 'opacity-100' */
|
|
90
|
+
leaveFrom: string;
|
|
91
|
+
/** @defaultValue 'opacity-0' */
|
|
92
|
+
leaveTo: string
|
|
93
|
+
};
|
|
94
|
+
slide: {
|
|
95
|
+
/** @defaultValue 'transition-transform' */
|
|
96
|
+
enter: string;
|
|
97
|
+
/** @defaultValue 'translate-y-2' */
|
|
98
|
+
enterFrom: string;
|
|
99
|
+
/** @defaultValue 'translate-y-0' */
|
|
100
|
+
enterTo: string;
|
|
101
|
+
/** @defaultValue 'transition-transform' */
|
|
102
|
+
leave: string;
|
|
103
|
+
/** @defaultValue 'translate-y-0' */
|
|
104
|
+
leaveFrom: string;
|
|
105
|
+
/** @defaultValue 'translate-y-2' */
|
|
106
|
+
leaveTo: string
|
|
107
|
+
};
|
|
108
|
+
slideLeft: {
|
|
109
|
+
/** @defaultValue 'transition-transform' */
|
|
110
|
+
enter: string;
|
|
111
|
+
/** @defaultValue 'translate-x-full' */
|
|
112
|
+
enterFrom: string;
|
|
113
|
+
/** @defaultValue 'translate-x-0' */
|
|
114
|
+
enterTo: string;
|
|
115
|
+
/** @defaultValue 'transition-transform' */
|
|
116
|
+
leave: string;
|
|
117
|
+
/** @defaultValue 'translate-x-0' */
|
|
118
|
+
leaveFrom: string;
|
|
119
|
+
/** @defaultValue '-translate-x-full' */
|
|
120
|
+
leaveTo: string
|
|
121
|
+
};
|
|
122
|
+
slideRight: {
|
|
123
|
+
/** @defaultValue 'transition-transform' */
|
|
124
|
+
enter: string;
|
|
125
|
+
/** @defaultValue '-translate-x-full' */
|
|
126
|
+
enterFrom: string;
|
|
127
|
+
/** @defaultValue 'translate-x-0' */
|
|
128
|
+
enterTo: string;
|
|
129
|
+
/** @defaultValue 'transition-transform' */
|
|
130
|
+
leave: string;
|
|
131
|
+
/** @defaultValue 'translate-x-0' */
|
|
132
|
+
leaveFrom: string;
|
|
133
|
+
/** @defaultValue 'translate-x-full' */
|
|
134
|
+
leaveTo: string
|
|
135
|
+
};
|
|
136
|
+
scale: {
|
|
137
|
+
/** @defaultValue 'transition-transform' */
|
|
138
|
+
enter: string;
|
|
139
|
+
/** @defaultValue 'scale-95' */
|
|
140
|
+
enterFrom: string;
|
|
141
|
+
/** @defaultValue 'scale-100' */
|
|
142
|
+
enterTo: string;
|
|
143
|
+
/** @defaultValue 'transition-transform' */
|
|
144
|
+
leave: string;
|
|
145
|
+
/** @defaultValue 'scale-100' */
|
|
146
|
+
leaveFrom: string;
|
|
147
|
+
/** @defaultValue 'scale-95' */
|
|
148
|
+
leaveTo: string
|
|
149
|
+
};
|
|
150
|
+
rotate: {
|
|
151
|
+
/** @defaultValue 'transition-transform' */
|
|
152
|
+
enter: string;
|
|
153
|
+
/** @defaultValue 'rotate-12 scale-95' */
|
|
154
|
+
enterFrom: string;
|
|
155
|
+
/** @defaultValue 'rotate-0 scale-100' */
|
|
156
|
+
enterTo: string;
|
|
157
|
+
/** @defaultValue 'transition-transform' */
|
|
158
|
+
leave: string;
|
|
159
|
+
/** @defaultValue 'rotate-0 scale-100' */
|
|
160
|
+
leaveFrom: string;
|
|
161
|
+
/** @defaultValue '-rotate-12 scale-95' */
|
|
162
|
+
leaveTo: string
|
|
163
|
+
};
|
|
164
|
+
zoom: {
|
|
165
|
+
/** @defaultValue 'transition-all' */
|
|
166
|
+
enter: string;
|
|
167
|
+
/** @defaultValue 'scale-0 opacity-0' */
|
|
168
|
+
enterFrom: string;
|
|
169
|
+
/** @defaultValue 'scale-100 opacity-100' */
|
|
170
|
+
enterTo: string;
|
|
171
|
+
/** @defaultValue 'transition-all' */
|
|
172
|
+
leave: string;
|
|
173
|
+
/** @defaultValue 'scale-100 opacity-100' */
|
|
174
|
+
leaveFrom: string;
|
|
175
|
+
/** @defaultValue 'scale-0 opacity-0' */
|
|
176
|
+
leaveTo: string
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
declare const p: unknown;
|
|
180
|
+
export declare const enterClass: unknown;
|
|
181
|
+
export declare const enterFromClass: unknown;
|
|
182
|
+
export declare const enterToClass: unknown;
|
|
183
|
+
export declare const leaveClass: unknown;
|
|
184
|
+
export declare const leaveFromClass: unknown;
|
|
185
|
+
export declare const leaveToClass: unknown;
|
|
186
|
+
export declare const durationStyle: string;
|
|
187
|
+
export declare const extraClass: unknown;
|
|
188
|
+
declare const showProp: {};
|
|
189
|
+
declare const visible: ReturnType<typeof state>;
|
|
190
|
+
declare type __DtsxStxComponentType = DefineComponent<{ show?: unknown, enter?: string, enterFrom?: string, enterTo?: string, leave?: string, leaveFrom?: string, leaveTo?: string, appear?: unknown, duration?: unknown, delay?: unknown, preset?: string, className?: string }> & { readonly __stxExposed?: { visible: typeof visible, setShow: typeof setShow } }
|
|
191
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
/** Width over height as CSS takes it: "16/9", "4/3", 0.5625. */
|
|
3
|
+
declare function ratio(value: unknown): string | unknown | unknown | string;
|
|
4
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
5
|
+
/*
|
|
6
|
+
* A video player: ts-video-player's <video-player>, with its own controls,
|
|
7
|
+
* for a file, an HLS or DASH stream, a YouTube link (played from
|
|
8
|
+
* youtube-nocookie.com) or a Vimeo link (with Do Not Track). The player draws
|
|
9
|
+
* its controls over a YouTube or Vimeo embed, so the provider's title bar and
|
|
10
|
+
* "Watch on YouTube" are not a way out of the page: the video plays here.
|
|
11
|
+
*
|
|
12
|
+
* <Video src="/videos/demo.mp4" poster="/demo.jpg" label="Product demo" />
|
|
13
|
+
*
|
|
14
|
+
* One player can play whichever video is chosen. `src`, `poster`,
|
|
15
|
+
* `aspectRatio` and `label` follow a parent's binding:
|
|
16
|
+
*
|
|
17
|
+
* <Video :src="current.url" :aspectRatio="current.aspect" autoplay />
|
|
18
|
+
*
|
|
19
|
+
* An empty `src` pauses it, which is what closing the dialog or sheet it sits
|
|
20
|
+
* in should do. With `autoplay`, each video chosen starts by itself (the
|
|
21
|
+
* person just asked for it).
|
|
22
|
+
*
|
|
23
|
+
* The controls speak the page's language (`<html lang>`): ts-video-player
|
|
24
|
+
* names its buttons and announces playback in it.
|
|
25
|
+
*/
|
|
26
|
+
export declare const src: unknown;
|
|
27
|
+
export declare const poster: unknown;
|
|
28
|
+
/** The accessible name of the player. Follows a binding. */
|
|
29
|
+
export declare const label: unknown;
|
|
30
|
+
/** A heading shown above the player. */
|
|
31
|
+
export declare const title: unknown;
|
|
32
|
+
export declare const autoplay: ReturnType<typeof $bool>;
|
|
33
|
+
export declare const loop: ReturnType<typeof $bool>;
|
|
34
|
+
export declare const muted: ReturnType<typeof $bool>;
|
|
35
|
+
export declare const controls: unknown;
|
|
36
|
+
export declare const playsinline: unknown;
|
|
37
|
+
export declare const disablePictureInPicture: ReturnType<typeof $bool>;
|
|
38
|
+
/** Focus the player when it is drawn (a dialog's first focus): its keys then work at once. */
|
|
39
|
+
export declare const autofocus: ReturnType<typeof $bool>;
|
|
40
|
+
export declare const preload: unknown;
|
|
41
|
+
export declare const crossorigin: unknown;
|
|
42
|
+
export declare const controlslist: unknown;
|
|
43
|
+
export declare const width: unknown;
|
|
44
|
+
export declare const height: unknown;
|
|
45
|
+
export declare const className: unknown;
|
|
46
|
+
export declare const aspectRatio: ReturnType<typeof ratio>;
|
|
47
|
+
declare const sources: unknown;
|
|
48
|
+
declare const tracks: unknown;
|
|
49
|
+
declare const drm: unknown;
|
|
50
|
+
declare const playerSources: unknown;
|
|
51
|
+
declare const playerTracks: ReturnType<typeof tracks.map>;
|
|
52
|
+
export declare const playerConfig: unknown;
|
|
53
|
+
/*
|
|
54
|
+
* A YouTube or Vimeo link is a web page, not a media file. Before the player
|
|
55
|
+
* is defined (or without JavaScript) the native <video> beneath it can play
|
|
56
|
+
* only a file, so for a page it stays empty rather than offering the link.
|
|
57
|
+
*/
|
|
58
|
+
export declare const isPage: unknown;
|
|
59
|
+
export declare const containerClasses: unknown;
|
|
60
|
+
declare type __DtsxStxComponentType = DefineComponent<{ src?: string, poster?: string, label?: unknown, title?: string, autoplay?: unknown, loop?: unknown, muted?: unknown, controls?: unknown, playsinline?: unknown, disablePictureInPicture?: unknown, autofocus?: unknown, preload?: string, crossorigin?: string, controlslist?: string, width?: string, height?: string, className?: unknown, class?: string, aspectRatio?: unknown, sources?: unknown, tracks?: unknown, drm?: unknown }>;
|
|
61
|
+
export default __dtsx_component__;
|
package/dist/ui/video/index.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const items: unknown;
|
|
4
|
+
export declare const itemHeight: unknown;
|
|
5
|
+
export declare const height: unknown;
|
|
6
|
+
export declare const overscan: unknown;
|
|
7
|
+
export declare const className: unknown;
|
|
8
|
+
export declare const totalHeight: unknown;
|
|
9
|
+
export declare const containerClasses: unknown;
|
|
10
|
+
declare const scrollTop: unknown;
|
|
11
|
+
declare type __DtsxStxComponentType = DefineComponent<{ items?: unknown[], itemHeight?: number, height?: number, overscan?: number, className?: string }> & { readonly __stxExposed?: { scrollTop: typeof scrollTop, scrollTo: (...args: any[]) => any } }
|
|
12
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const columns: unknown;
|
|
4
|
+
export declare const data: unknown;
|
|
5
|
+
export declare const rowHeight: unknown;
|
|
6
|
+
export declare const height: unknown;
|
|
7
|
+
export declare const headerHeight: unknown;
|
|
8
|
+
export declare const overscan: unknown;
|
|
9
|
+
export declare const striped: ReturnType<typeof $bool>;
|
|
10
|
+
export declare const hoverable: unknown;
|
|
11
|
+
export declare const className: unknown;
|
|
12
|
+
export declare const totalHeight: unknown;
|
|
13
|
+
export declare const containerClasses: unknown;
|
|
14
|
+
export declare const headerClasses: unknown;
|
|
15
|
+
export declare const headerCellClasses: unknown;
|
|
16
|
+
export declare const bodyClasses: unknown;
|
|
17
|
+
export declare const rowClasses: unknown;
|
|
18
|
+
export declare const cellClasses: unknown;
|
|
19
|
+
declare const scrollTop: unknown;
|
|
20
|
+
declare type __DtsxStxComponentType = DefineComponent<{ columns?: unknown[], data?: unknown[], rowHeight?: number, height?: number, headerHeight?: number, overscan?: number, striped?: unknown, hoverable?: unknown, className?: string }> & { readonly __stxExposed?: { scrollTop: typeof scrollTop } }
|
|
21
|
+
export default __dtsx_component__;
|
|
@@ -106,6 +106,21 @@ export declare const KeyboardKeys: {
|
|
|
106
106
|
};
|
|
107
107
|
/**
|
|
108
108
|
* ARIA attribute helpers
|
|
109
|
+
* @defaultValue
|
|
110
|
+
* ```ts
|
|
111
|
+
* {
|
|
112
|
+
* setExpanded: (element: HTMLElement, expanded: boolean) => void,
|
|
113
|
+
* setSelected: (element: HTMLElement, selected: boolean) => void,
|
|
114
|
+
* setChecked: (element: HTMLElement, checked: boolean | 'mixed') => void,
|
|
115
|
+
* setDisabled: (element: HTMLElement, disabled: boolean) => void,
|
|
116
|
+
* setHidden: (element: HTMLElement, hidden: boolean) => void,
|
|
117
|
+
* setPressed: (element: HTMLElement, pressed: boolean) => void,
|
|
118
|
+
* setInvalid: (element: HTMLElement, invalid: boolean) => void,
|
|
119
|
+
* setRequired: (element: HTMLElement, required: boolean) => void,
|
|
120
|
+
* setLive: (element: HTMLElement, live: AriaLive) => void,
|
|
121
|
+
* setBusy: (element: HTMLElement, busy: boolean) => void
|
|
122
|
+
* }
|
|
123
|
+
* ```
|
|
109
124
|
*/
|
|
110
125
|
export declare const aria: {
|
|
111
126
|
/**
|
|
@@ -35,9 +35,9 @@ catch (error) {
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
export declare function handleError(error: Error, options?: {
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
throwError?: boolean
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
logError?: boolean
|
|
42
42
|
}): void;
|
|
43
43
|
/* ... * / },
|
|
@@ -108,6 +108,19 @@ export declare function createDebugger(component: string): {
|
|
|
108
108
|
export declare function errorBoundary<T>(component: string, renderFn: () => T, fallback: T): T;
|
|
109
109
|
/**
|
|
110
110
|
* Error types for common scenarios
|
|
111
|
+
* @defaultValue
|
|
112
|
+
* ```ts
|
|
113
|
+
* {
|
|
114
|
+
* invalidProp: (component: string, prop: string, received: any, expected: any) => ComponentError,
|
|
115
|
+
* requiredProp: (component: string, prop: string) => ComponentError,
|
|
116
|
+
* invalidType: (component: string, prop: string, received: any, expected: string) => ComponentError,
|
|
117
|
+
* componentNotFound: (componentName: string) => ComponentError,
|
|
118
|
+
* invalidChildren: (component: string, received: any, expected: string) => ComponentError,
|
|
119
|
+
* stateUpdate: (component: string, stateName: string, error: Error) => ComponentError,
|
|
120
|
+
* eventHandler: (component: string, eventName: string, error: Error) => ComponentError,
|
|
121
|
+
* render: (component: string, error: Error) => ComponentError
|
|
122
|
+
* }
|
|
123
|
+
* ```
|
|
111
124
|
*/
|
|
112
125
|
export declare const ErrorTypes: {
|
|
113
126
|
/**
|
package/dist/utils/i18n.d.ts
CHANGED
|
@@ -94,78 +94,61 @@ export declare function isRTL(locale: string): boolean;
|
|
|
94
94
|
export declare function loadLocaleMessages(locale: string, loadFn: () => Promise<Messages>): Promise<Messages>;
|
|
95
95
|
/**
|
|
96
96
|
* Predefined pluralization rules for common languages
|
|
97
|
+
* @defaultValue
|
|
98
|
+
* ```ts
|
|
99
|
+
* {
|
|
100
|
+
* en: (count) => number,
|
|
101
|
+
* de: (count) => number,
|
|
102
|
+
* nl: (count) => number,
|
|
103
|
+
* sv: (count) => number,
|
|
104
|
+
* fr: (count) => number,
|
|
105
|
+
* pt_BR: (count) => number,
|
|
106
|
+
* ru: (count) => unknown,
|
|
107
|
+
* pl: (count) => unknown,
|
|
108
|
+
* cs: (count) => unknown,
|
|
109
|
+
* ar: (count) => unknown,
|
|
110
|
+
* ja: () => number,
|
|
111
|
+
* ko: () => number,
|
|
112
|
+
* zh: () => number,
|
|
113
|
+
* th: () => number,
|
|
114
|
+
* vi: () => number
|
|
115
|
+
* }
|
|
116
|
+
* ```
|
|
97
117
|
*/
|
|
98
|
-
export declare const pluralRules:
|
|
99
|
-
en: (count) => unknown;
|
|
100
|
-
de: (count) => unknown;
|
|
101
|
-
nl: (count) => unknown;
|
|
102
|
-
sv: (count) => unknown;
|
|
103
|
-
fr: (count) => unknown;
|
|
104
|
-
pt_BR: (count) => unknown;
|
|
105
|
-
ru: (count) => unknown;
|
|
106
|
-
pl: (count) => unknown;
|
|
107
|
-
cs: (count) => unknown;
|
|
108
|
-
ar: (count) => unknown;
|
|
109
|
-
ja: () => 0;
|
|
110
|
-
ko: () => 0;
|
|
111
|
-
zh: () => 0;
|
|
112
|
-
th: () => 0;
|
|
113
|
-
vi: () => 0
|
|
114
|
-
};
|
|
118
|
+
export declare const pluralRules: Record<string, PluralRule>;
|
|
115
119
|
/**
|
|
116
120
|
* Common date/time format presets
|
|
121
|
+
* @defaultValue
|
|
122
|
+
* ```ts
|
|
123
|
+
* {
|
|
124
|
+
* short: { year: 'numeric', month: 'numeric', day: 'numeric' },
|
|
125
|
+
* long: { year: 'numeric', month: 'long', day: 'numeric' },
|
|
126
|
+
* full: { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' },
|
|
127
|
+
* time: { hour: 'numeric', minute: 'numeric' },
|
|
128
|
+
* datetime: {
|
|
129
|
+
* year: 'numeric',
|
|
130
|
+
* month: 'numeric',
|
|
131
|
+
* day: 'numeric',
|
|
132
|
+
* hour: 'numeric',
|
|
133
|
+
* minute: 'numeric'
|
|
134
|
+
* }
|
|
135
|
+
* }
|
|
136
|
+
* ```
|
|
117
137
|
*/
|
|
118
|
-
export declare const dateTimeFormats:
|
|
119
|
-
short: {
|
|
120
|
-
year: 'numeric';
|
|
121
|
-
month: 'numeric';
|
|
122
|
-
day: 'numeric'
|
|
123
|
-
};
|
|
124
|
-
long: {
|
|
125
|
-
year: 'numeric';
|
|
126
|
-
month: 'long';
|
|
127
|
-
day: 'numeric'
|
|
128
|
-
};
|
|
129
|
-
full: {
|
|
130
|
-
weekday: 'long';
|
|
131
|
-
year: 'numeric';
|
|
132
|
-
month: 'long';
|
|
133
|
-
day: 'numeric'
|
|
134
|
-
};
|
|
135
|
-
time: {
|
|
136
|
-
hour: 'numeric';
|
|
137
|
-
minute: 'numeric'
|
|
138
|
-
};
|
|
139
|
-
datetime: {
|
|
140
|
-
year: 'numeric';
|
|
141
|
-
month: 'numeric';
|
|
142
|
-
day: 'numeric';
|
|
143
|
-
hour: 'numeric';
|
|
144
|
-
minute: 'numeric'
|
|
145
|
-
}
|
|
146
|
-
};
|
|
138
|
+
export declare const dateTimeFormats: Record<string, Intl.DateTimeFormatOptions>;
|
|
147
139
|
/**
|
|
148
140
|
* Common number format presets
|
|
141
|
+
* @defaultValue
|
|
142
|
+
* ```ts
|
|
143
|
+
* {
|
|
144
|
+
* decimal: { style: 'decimal', minimumFractionDigits: 2, maximumFractionDigits: 2 },
|
|
145
|
+
* currency: { style: 'currency', currency: 'USD' },
|
|
146
|
+
* percent: { style: 'percent', minimumFractionDigits: 0, maximumFractionDigits: 2 },
|
|
147
|
+
* compact: { notation: 'compact' }
|
|
148
|
+
* }
|
|
149
|
+
* ```
|
|
149
150
|
*/
|
|
150
|
-
export declare const numberFormats:
|
|
151
|
-
decimal: {
|
|
152
|
-
style: 'decimal';
|
|
153
|
-
minimumFractionDigits: 2;
|
|
154
|
-
maximumFractionDigits: 2
|
|
155
|
-
};
|
|
156
|
-
currency: {
|
|
157
|
-
style: 'currency';
|
|
158
|
-
currency: 'USD'
|
|
159
|
-
};
|
|
160
|
-
percent: {
|
|
161
|
-
style: 'percent';
|
|
162
|
-
minimumFractionDigits: 0;
|
|
163
|
-
maximumFractionDigits: 2
|
|
164
|
-
};
|
|
165
|
-
compact: {
|
|
166
|
-
notation: 'compact'
|
|
167
|
-
}
|
|
168
|
-
};
|
|
151
|
+
export declare const numberFormats: Record<string, Intl.NumberFormatOptions>;
|
|
169
152
|
/**
|
|
170
153
|
* Component-specific i18n messages
|
|
171
154
|
*
|
|
@@ -37,7 +37,17 @@ export declare function createKeepAlive(options?: KeepAliveOptions): KeepAlive;
|
|
|
37
37
|
* cache.has('key1') // true
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
export declare function createLRUCache<T = any>(maxSize: number):
|
|
40
|
+
export declare function createLRUCache<T = any>(maxSize: number): {
|
|
41
|
+
set: (key: string, value: T) => void;
|
|
42
|
+
get: (key: string) => T | undefined;
|
|
43
|
+
has: (key: string) => boolean;
|
|
44
|
+
delete: (key: string) => boolean;
|
|
45
|
+
clear: () => void;
|
|
46
|
+
get size(): number;
|
|
47
|
+
keys: () => string[];
|
|
48
|
+
values: () => T[];
|
|
49
|
+
forEach: (callback: (value: T, key: string) => void) => void
|
|
50
|
+
};
|
|
41
51
|
/**
|
|
42
52
|
* State manager for component state preservation
|
|
43
53
|
*
|
|
@@ -55,7 +65,15 @@ export declare function createLRUCache<T = any>(maxSize: number): void;
|
|
|
55
65
|
* console.log(state.count) // 5
|
|
56
66
|
* ```
|
|
57
67
|
*/
|
|
58
|
-
export declare function createStateManager():
|
|
68
|
+
export declare function createStateManager(): {
|
|
69
|
+
save: (key: string, state: Record<string, any>) => void;
|
|
70
|
+
restore: (key: string) => Record<string, any> | null;
|
|
71
|
+
has: (key: string) => boolean;
|
|
72
|
+
remove: (key: string) => boolean;
|
|
73
|
+
clear: () => void;
|
|
74
|
+
keys: () => string[];
|
|
75
|
+
get size(): number
|
|
76
|
+
};
|
|
59
77
|
/**
|
|
60
78
|
* Create a component pool for object reuse
|
|
61
79
|
*
|
|
@@ -79,7 +97,13 @@ export declare function createStateManager(): void;
|
|
|
79
97
|
* pool.release(instance)
|
|
80
98
|
* ```
|
|
81
99
|
*/
|
|
82
|
-
export declare function createComponentPool<T>(factory: () => T, options?: { maxSize?: number, reset?: (instance: T) => void }):
|
|
100
|
+
export declare function createComponentPool<T>(factory: () => T, options?: { maxSize?: number, reset?: (instance: T) => void }): {
|
|
101
|
+
acquire: () => T;
|
|
102
|
+
release: (instance: T) => void;
|
|
103
|
+
clear: () => void;
|
|
104
|
+
get size(): number;
|
|
105
|
+
get maxSize(): number
|
|
106
|
+
};
|
|
83
107
|
/**
|
|
84
108
|
* KeepAlive utilities for @stacksjs/components
|
|
85
109
|
*
|
|
@@ -102,7 +102,11 @@ export declare function getCacheStats(): { size: number, keys: string[] };
|
|
|
102
102
|
* const component = await loader.load('/about')
|
|
103
103
|
* ```
|
|
104
104
|
*/
|
|
105
|
-
export declare function createRouteLoader(routes: Record<string, () => Promise<any>>):
|
|
105
|
+
export declare function createRouteLoader(routes: Record<string, () => Promise<any>>): {
|
|
106
|
+
load: (path: string) => Promise<any>;
|
|
107
|
+
preload: (path: string) => Promise<any>;
|
|
108
|
+
preloadRoutes: (paths: string[]) => Promise<any[]>
|
|
109
|
+
};
|
|
106
110
|
/**
|
|
107
111
|
* Image lazy loading helper
|
|
108
112
|
*
|