@ansh-ui/vue 0.2.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/LICENSE +21 -0
- package/dist/chunk-2VSROZ2N.js +1281 -0
- package/dist/chunk-2VSROZ2N.js.map +1 -0
- package/dist/chunk-5BQEZYG6.cjs +1294 -0
- package/dist/chunk-5BQEZYG6.cjs.map +1 -0
- package/dist/chunk-6732H4BQ.cjs +28 -0
- package/dist/chunk-6732H4BQ.cjs.map +1 -0
- package/dist/chunk-6ABPGOJP.js +722 -0
- package/dist/chunk-6ABPGOJP.js.map +1 -0
- package/dist/chunk-6XJOB6LE.js +62 -0
- package/dist/chunk-6XJOB6LE.js.map +1 -0
- package/dist/chunk-774WBLDR.cjs +24 -0
- package/dist/chunk-774WBLDR.cjs.map +1 -0
- package/dist/chunk-B6OXKW5Q.js +567 -0
- package/dist/chunk-B6OXKW5Q.js.map +1 -0
- package/dist/chunk-DMPNT3MY.cjs +64 -0
- package/dist/chunk-DMPNT3MY.cjs.map +1 -0
- package/dist/chunk-EISHOEB6.cjs +158 -0
- package/dist/chunk-EISHOEB6.cjs.map +1 -0
- package/dist/chunk-EVO23GUS.js +223 -0
- package/dist/chunk-EVO23GUS.js.map +1 -0
- package/dist/chunk-FVKLCGA4.js +1035 -0
- package/dist/chunk-FVKLCGA4.js.map +1 -0
- package/dist/chunk-IOXGBPOV.cjs +3681 -0
- package/dist/chunk-IOXGBPOV.cjs.map +1 -0
- package/dist/chunk-J2LA4GRP.cjs +1051 -0
- package/dist/chunk-J2LA4GRP.cjs.map +1 -0
- package/dist/chunk-JQ4YLXXM.cjs +580 -0
- package/dist/chunk-JQ4YLXXM.cjs.map +1 -0
- package/dist/chunk-KCA7RNJ4.cjs +781 -0
- package/dist/chunk-KCA7RNJ4.cjs.map +1 -0
- package/dist/chunk-NJDDNO4C.js +23 -0
- package/dist/chunk-NJDDNO4C.js.map +1 -0
- package/dist/chunk-OAQ7MDYX.js +22 -0
- package/dist/chunk-OAQ7MDYX.js.map +1 -0
- package/dist/chunk-PP6OYURM.cjs +238 -0
- package/dist/chunk-PP6OYURM.cjs.map +1 -0
- package/dist/chunk-SHX2JGID.cjs +269 -0
- package/dist/chunk-SHX2JGID.cjs.map +1 -0
- package/dist/chunk-SOYRICHU.js +3645 -0
- package/dist/chunk-SOYRICHU.js.map +1 -0
- package/dist/chunk-T425FIC7.js +773 -0
- package/dist/chunk-T425FIC7.js.map +1 -0
- package/dist/chunk-TMG3M6TK.js +152 -0
- package/dist/chunk-TMG3M6TK.js.map +1 -0
- package/dist/chunk-XLLSS464.cjs +286 -0
- package/dist/chunk-XLLSS464.cjs.map +1 -0
- package/dist/chunk-XZ5ZFLZM.js +280 -0
- package/dist/chunk-XZ5ZFLZM.js.map +1 -0
- package/dist/chunk-Z7XOFKM4.cjs +733 -0
- package/dist/chunk-Z7XOFKM4.cjs.map +1 -0
- package/dist/chunk-ZGMXOMCB.js +266 -0
- package/dist/chunk-ZGMXOMCB.js.map +1 -0
- package/dist/data.cjs +70 -0
- package/dist/data.cjs.map +1 -0
- package/dist/data.d.cts +963 -0
- package/dist/data.d.ts +963 -0
- package/dist/data.js +5 -0
- package/dist/data.js.map +1 -0
- package/dist/form.cjs +151 -0
- package/dist/form.cjs.map +1 -0
- package/dist/form.d.cts +2639 -0
- package/dist/form.d.ts +2639 -0
- package/dist/form.js +6 -0
- package/dist/form.js.map +1 -0
- package/dist/index.cjs +1158 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +439 -0
- package/dist/index.d.ts +439 -0
- package/dist/index.js +547 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.cjs +67 -0
- package/dist/layout.cjs.map +1 -0
- package/dist/layout.d.cts +729 -0
- package/dist/layout.d.ts +729 -0
- package/dist/layout.js +6 -0
- package/dist/layout.js.map +1 -0
- package/dist/motion.cjs +50 -0
- package/dist/motion.cjs.map +1 -0
- package/dist/motion.d.cts +681 -0
- package/dist/motion.d.ts +681 -0
- package/dist/motion.js +5 -0
- package/dist/motion.js.map +1 -0
- package/dist/navigation.cjs +48 -0
- package/dist/navigation.cjs.map +1 -0
- package/dist/navigation.d.cts +515 -0
- package/dist/navigation.d.ts +515 -0
- package/dist/navigation.js +7 -0
- package/dist/navigation.js.map +1 -0
- package/dist/overlay.cjs +61 -0
- package/dist/overlay.cjs.map +1 -0
- package/dist/overlay.d.cts +772 -0
- package/dist/overlay.d.ts +772 -0
- package/dist/overlay.js +8 -0
- package/dist/overlay.js.map +1 -0
- package/dist/position-Cn7qP1pn.d.cts +50 -0
- package/dist/position-Cn7qP1pn.d.ts +50 -0
- package/dist/primitives.cjs +129 -0
- package/dist/primitives.cjs.map +1 -0
- package/dist/primitives.d.cts +300 -0
- package/dist/primitives.d.ts +300 -0
- package/dist/primitives.js +8 -0
- package/dist/primitives.js.map +1 -0
- package/dist/sidebar-CQqEmpid.d.cts +124 -0
- package/dist/sidebar-CTZ-Ckko.d.ts +124 -0
- package/dist/styles.css +5593 -0
- package/dist/utils-IKPG3zcC.d.cts +46 -0
- package/dist/utils-IKPG3zcC.d.ts +46 -0
- package/package.json +91 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
export { AnchoredPosition, AnchoredPositionOptions, DismissOptions, UseInViewOptions, getLayerStack, getTabbable, useAnchoredPosition, useAnimate, useAnimatedFrom, useAutoFocus, useControllableState, useDismiss, useElementSize, useFocusRestore, useFocusTrap, useFrameBudget, useInView, useMotionRef, useMotionStyle, useMotionValue, usePointer, usePresence, useReducedMotion, useRovingFocus, useScrollLock, useScrollProgress, useSpringValue, useTicker, useWindowScroll } from './primitives.js';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
import { DefineComponent, Ref, PropType, Plugin } from 'vue';
|
|
4
|
+
import * as _ansh_ui_core from '@ansh-ui/core';
|
|
5
|
+
import { BaseEffectOptions, EffectDefinition, BaseBehaviourOptions, BehaviourDefinition, ReducedMotionMode } from '@ansh-ui/core';
|
|
6
|
+
export { AnimationControls, AnimationOptions, BaseEffectOptions, ColorInput, ColorSpace, EasingInput, EffectDefinition, FrameState, Gradient, Timeline as MotionTimeline, MotionValue, PaletteName, PointerState, ReducedMotionStrategy, Rgb, SpringOptions, StaggerFrom, StaggerOptions, animate, checkContrast, createGradient, createNoise, createScale, createTimeline, cubicBezier, easings, ensureContrast, generatePalette, getRegistry, getTicker, mixColors, motionValue, palettes, parseColor, pickReadable, prefersReducedMotion, registerEasing, setReducedMotionMode, signature as signatureEasings, springs, stagger, toHex, toOklchString } from '@ansh-ui/core';
|
|
7
|
+
export { AnimatePresence, AnimatePresenceProps, AnimatedText, Draggable, DraggableProps, GradientText, Motion, MotionConfig, MotionConfigValue, MotionTransition, MotionValues, ThemeContextValue, ThemeProvider, ThemeSetting, themeScript, useMotionConfig, useTheme } from './motion.js';
|
|
8
|
+
import { S as SlotContent } from './utils-IKPG3zcC.js';
|
|
9
|
+
export { R as ReadonlyRef, c as cx, r as resolveSlotContent, u as useId } from './utils-IKPG3zcC.js';
|
|
10
|
+
export { A as Align, P as Placement, a as PositionOptions, b as PositionResult, R as Rect, S as Side, c as computePosition } from './position-Cn7qP1pn.js';
|
|
11
|
+
export { AspectRatio, AspectRatioProps, Center, CenterProps, Container, ContainerProps, Divider, DividerProps, Grid, GridItem, GridItemProps, GridProps, HStack, Resizable, ResizableProps, ScrollArea, ScrollAreaProps, SpaceToken, Spacer, SpacerProps, Stack, StackProps, VStack } from './layout.js';
|
|
12
|
+
export { Calendar, CalendarProps, Checkbox, ChoiceCard, ColorPicker, ColorPickerProps, Combobox, DatePicker, DatePickerProps, DateRange, DateRangePicker, DateRangePickerProps, Dropzone, DropzoneFile, Field, FieldContextValue, FieldControlAttrs, Fieldset, Input, InputSize, NumberInput, OptionList, OptionListProps, PinInput, Radio, RadioGroup, RadioGroupProps, RangeSlider, Rating, RatingSize, Select, SelectOption, Slider, SliderMark, Switch, TagsInput, Textarea, VisuallyHidden, addDays, addMonths, filterOptions, firstEnabled, isSameDay, scoreOption, startOfDay, stepActive, useFieldContext, useFieldControl, useTypeahead } from './form.js';
|
|
13
|
+
export { AlertDialog, ContextMenu, Dialog, DialogFooter, DialogSize, Drawer, DrawerSide, DropdownMenu, HoverCard, MenuAction, MenuCheckbox, MenuEntry, MenuRadioGroup, MenuSubmenu, Popover, PopoverContent, PopoverTrigger, Tooltip, TooltipProvider } from './overlay.js';
|
|
14
|
+
export { Avatar, AvatarGroup, AvatarProps, Badge, BadgeTone, CircularProgress, CircularProgressProps, CodeBlock, CodeBlockProps, Column, DataTable, DataTableProps, DescriptionList, DescriptionListProps, EmptyState, EmptyStateProps, Kbd, Meter, MeterProps, Pagination, PaginationProps, Progress, ProgressProps, SortDirection, SortState, Stat, StatProps, Table, Timeline, TimelineItem } from './data.js';
|
|
15
|
+
export { Accordion, AccordionItem, AccordionVariant, Breadcrumbs, Collapsible, CollapsibleProps, Crumb, DisclosureList, DisclosureListProps, MegaMenuColumn, MegaMenuLink, NavMenuItem, NavigationMenu, Step, Stepper, StepperOrientation, TabItem, Tabs, TabsOrientation, TabsSize, TabsVariant } from './navigation.js';
|
|
16
|
+
export { A as AppShell, N as NavItem, a as NavSection, S as Sidebar } from './sidebar-CTZ-Ckko.js';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Turn an {@link EffectDefinition} into a Vue 3 component.
|
|
20
|
+
*
|
|
21
|
+
* The Vue counterpart of the React factory, and the reason both frameworks are supported without
|
|
22
|
+
* duplicating a single line of visual logic. All behaviour lives in `@ansh-ui/core`; this file owns
|
|
23
|
+
* only the Vue lifecycle.
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* export const AuroraBackground = createEffectComponent(aurora, 'AuroraBackground')
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* What each generated component provides:
|
|
30
|
+
*
|
|
31
|
+
* - **SSR safety.** `mountEffect` runs in `onMounted`, which never executes on the server, so the
|
|
32
|
+
* server-rendered markup is the host element and its slot content — identical to the first
|
|
33
|
+
* client render, so hydration is clean.
|
|
34
|
+
* - **Live prop updates.** A deep watcher on the resolved options calls `handle.update()`, which
|
|
35
|
+
* live-updates what it can and remounts only structural changes.
|
|
36
|
+
* - **Attribute fall-through** via `inheritAttrs: false` plus explicit binding, so `class`,
|
|
37
|
+
* `style` and listeners land on the host element and merge with our own positioning styles
|
|
38
|
+
* rather than replacing them.
|
|
39
|
+
* - **Complete teardown** in `onBeforeUnmount`.
|
|
40
|
+
*/
|
|
41
|
+
/** Props every generated effect component accepts beyond its own options. */
|
|
42
|
+
interface EffectComponentBaseProps {
|
|
43
|
+
/** Tag or component to render as the host. Default `'div'`. */
|
|
44
|
+
as?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The public type of a generated component.
|
|
48
|
+
*
|
|
49
|
+
* `DefineComponent<Props>` gives full prop autocompletion and type-checking inside SFC templates,
|
|
50
|
+
* which is the whole point of generating a real component rather than exposing a directive.
|
|
51
|
+
*/
|
|
52
|
+
type VueEffectComponent<Options extends BaseEffectOptions> = DefineComponent<Options & EffectComponentBaseProps>;
|
|
53
|
+
declare function createEffectComponent<Options extends BaseEffectOptions>(definition: EffectDefinition<Options>, name?: string): VueEffectComponent<Options>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Turn a {@link BehaviourDefinition} into a Vue 3 component.
|
|
57
|
+
*
|
|
58
|
+
* Unlike the effect factory this renders its slot content **directly**, with no positioned wrapper:
|
|
59
|
+
* a behaviour manipulates the host element itself, and injecting a wrapper would break the author's
|
|
60
|
+
* layout — a magnetic button inside an extra div is no longer a flex child of its container.
|
|
61
|
+
*/
|
|
62
|
+
interface BehaviourComponentBaseProps {
|
|
63
|
+
as?: string;
|
|
64
|
+
}
|
|
65
|
+
type VueBehaviourComponent<Options extends BaseBehaviourOptions> = DefineComponent<Options & BehaviourComponentBaseProps>;
|
|
66
|
+
declare function createBehaviourComponent<Options extends BaseBehaviourOptions, El extends HTMLElement = HTMLElement>(definition: BehaviourDefinition<Options, El>, name?: string, defaultTag?: string): VueBehaviourComponent<Options>;
|
|
67
|
+
/**
|
|
68
|
+
* Attach a behaviour to an element you already have a template ref to.
|
|
69
|
+
*
|
|
70
|
+
* The composable form, for when a behaviour must apply to an existing component's own element
|
|
71
|
+
* rather than to a wrapper — which is most of the time when integrating with a design system.
|
|
72
|
+
*
|
|
73
|
+
* ```vue
|
|
74
|
+
* <script setup>
|
|
75
|
+
* const button = ref(null)
|
|
76
|
+
* useBehaviour(button, magnetic, { strength: 16 })
|
|
77
|
+
* </script>
|
|
78
|
+
* <template><button ref="button">Go</button></template>
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* The target is watched rather than read once, so it works with `v-if` and with elements that
|
|
82
|
+
* mount after setup.
|
|
83
|
+
*/
|
|
84
|
+
declare function useBehaviour<Options extends BaseBehaviourOptions, El extends HTMLElement>(target: Ref<El | null | undefined>, definition: BehaviourDefinition<Options, El>, options?: Options | (() => Partial<Options>)): void;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The Vue component set.
|
|
88
|
+
*
|
|
89
|
+
* Every component is one factory call over the same `@ansh-ui/core` definition the React package
|
|
90
|
+
* uses. That is the payoff of the layered architecture: parity between frameworks is structural
|
|
91
|
+
* rather than something to be maintained by hand, and a fix to an effect fixes it everywhere.
|
|
92
|
+
*
|
|
93
|
+
* ```vue
|
|
94
|
+
* <script setup>
|
|
95
|
+
* import { AuroraBackground, MagneticButton } from '@ansh-ui/vue'
|
|
96
|
+
* </script>
|
|
97
|
+
*
|
|
98
|
+
* <template>
|
|
99
|
+
* <AuroraBackground :colors="['#0275f4', '#9f0550']" class="hero">
|
|
100
|
+
* <h1>Motion, refined.</h1>
|
|
101
|
+
* <MagneticButton :strength="16">Get started</MagneticButton>
|
|
102
|
+
* </AuroraBackground>
|
|
103
|
+
* </template>
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
/** Vertical curtains of light with ridged filament structure. */
|
|
107
|
+
declare const AuroraBackground: VueEffectComponent<_ansh_ui_core.AuroraOptions>;
|
|
108
|
+
/** Soft overlapping colour fields drifting on non-repeating Lissajous paths. */
|
|
109
|
+
declare const MeshGradient: VueEffectComponent<_ansh_ui_core.MeshGradientOptions>;
|
|
110
|
+
/** A rotating multi-stop linear gradient. One fill per frame. */
|
|
111
|
+
declare const AnimatedGradient: VueEffectComponent<_ansh_ui_core.AnimatedGradientOptions>;
|
|
112
|
+
/** Points advected by a divergence-free curl-noise flow field. */
|
|
113
|
+
declare const ParticleField: VueEffectComponent<_ansh_ui_core.ParticleFieldOptions>;
|
|
114
|
+
/** Drifting nodes joined by lines, with the pointer as a live node. */
|
|
115
|
+
declare const Constellation: VueEffectComponent<_ansh_ui_core.ConstellationOptions>;
|
|
116
|
+
/** Streaks falling across the canvas, spawned as a Poisson process. */
|
|
117
|
+
declare const MeteorShower: VueEffectComponent<_ansh_ui_core.MeteorsOptions>;
|
|
118
|
+
/** Depth-parallaxed rain, optionally with splash rings. */
|
|
119
|
+
declare const Rain: VueEffectComponent<_ansh_ui_core.RainOptions>;
|
|
120
|
+
/** Depth-parallaxed snow with independent per-flake sway. */
|
|
121
|
+
declare const Snow: VueEffectComponent<_ansh_ui_core.SnowOptions>;
|
|
122
|
+
/** Wandering points with asymmetric bioluminescent pulsing. */
|
|
123
|
+
declare const Fireflies: VueEffectComponent<_ansh_ui_core.FirefliesOptions>;
|
|
124
|
+
/** Layered undulating bands from three incommensurable sines plus noise. */
|
|
125
|
+
declare const Waves: VueEffectComponent<_ansh_ui_core.WavesOptions>;
|
|
126
|
+
/** Organic shapes morphing via noise sampled on a closed circle. */
|
|
127
|
+
declare const LiquidBlob: VueEffectComponent<_ansh_ui_core.BlobOptions>;
|
|
128
|
+
/** Film grain overlay. Hides gradient banding and gives flat colour texture. */
|
|
129
|
+
declare const NoiseLayer: VueEffectComponent<_ansh_ui_core.NoiseLayerOptions>;
|
|
130
|
+
/** A soft light following the pointer, easing in and out. */
|
|
131
|
+
declare const Spotlight: VueEffectComponent<_ansh_ui_core.SpotlightOptions>;
|
|
132
|
+
/** An element that leans toward the pointer, spring-driven. Renders a `<button>` by default. */
|
|
133
|
+
declare const MagneticButton: VueBehaviourComponent<_ansh_ui_core.MagneticOptions>;
|
|
134
|
+
/** A card that rotates in 3D toward the pointer, with a moving specular highlight. */
|
|
135
|
+
declare const TiltCard: VueBehaviourComponent<_ansh_ui_core.TiltOptions>;
|
|
136
|
+
/** A wave expanding from the point of contact. Also fires on Enter and Space. */
|
|
137
|
+
declare const Ripple: VueBehaviourComponent<_ansh_ui_core.RippleOptions>;
|
|
138
|
+
/** Seamless infinite scrolling. Speed is in pixels per second, not a duration. */
|
|
139
|
+
declare const Marquee: VueBehaviourComponent<_ansh_ui_core.MarqueeOptions>;
|
|
140
|
+
/** Reveal content as it enters the viewport. Degrades to visible if JavaScript never runs. */
|
|
141
|
+
declare const ScrollReveal: VueBehaviourComponent<_ansh_ui_core.ScrollRevealOptions>;
|
|
142
|
+
/** Move an element at a different rate from the scroll. Disabled under reduced motion. */
|
|
143
|
+
declare const Parallax: VueBehaviourComponent<_ansh_ui_core.ParallaxOptions>;
|
|
144
|
+
|
|
145
|
+
type AlertTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
146
|
+
type AlertVariant = 'soft' | 'outline' | 'solid';
|
|
147
|
+
/**
|
|
148
|
+
* An inline message — the Vue counterpart of `@ansh-ui/react`'s `Alert`.
|
|
149
|
+
*
|
|
150
|
+
* The `role` follows the tone, because it decides whether a screen reader interrupts:
|
|
151
|
+
* `role="alert"` (assertive) for errors and warnings, which the user needs to know about *now*;
|
|
152
|
+
* `role="status"` (polite) for information and success, which can wait for a pause.
|
|
153
|
+
*
|
|
154
|
+
* Using `alert` for everything is the common mistake, and it makes a screen reader cut off whatever
|
|
155
|
+
* it was saying to announce that a draft was saved.
|
|
156
|
+
*
|
|
157
|
+
* The tone is always carried by the icon and the text, never by colour alone.
|
|
158
|
+
*
|
|
159
|
+
* The React version's `children` prop (the message body) is this component's default slot — the
|
|
160
|
+
* primary content, same split `Field` uses between its default slot (the control) and its
|
|
161
|
+
* `label`/`description`/`error` props (short annotations). `title` and `actions` stay props for the
|
|
162
|
+
* same reason those are props on `Field`.
|
|
163
|
+
*/
|
|
164
|
+
declare const Alert: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
165
|
+
tone: {
|
|
166
|
+
type: PropType<AlertTone>;
|
|
167
|
+
default: string;
|
|
168
|
+
};
|
|
169
|
+
title: {
|
|
170
|
+
type: PropType<SlotContent>;
|
|
171
|
+
default: undefined;
|
|
172
|
+
};
|
|
173
|
+
/** Replace the default icon, or pass `null` to omit it. */
|
|
174
|
+
icon: {
|
|
175
|
+
type: PropType<SlotContent | null>;
|
|
176
|
+
default: undefined;
|
|
177
|
+
};
|
|
178
|
+
/** Show a dismiss button. */
|
|
179
|
+
dismissible: {
|
|
180
|
+
type: BooleanConstructor;
|
|
181
|
+
default: boolean;
|
|
182
|
+
};
|
|
183
|
+
/** Buttons or links under the message. */
|
|
184
|
+
actions: {
|
|
185
|
+
type: PropType<SlotContent>;
|
|
186
|
+
default: undefined;
|
|
187
|
+
};
|
|
188
|
+
variant: {
|
|
189
|
+
type: PropType<AlertVariant>;
|
|
190
|
+
default: string;
|
|
191
|
+
};
|
|
192
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
193
|
+
[key: string]: any;
|
|
194
|
+
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "dismiss"[], "dismiss", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
195
|
+
tone: {
|
|
196
|
+
type: PropType<AlertTone>;
|
|
197
|
+
default: string;
|
|
198
|
+
};
|
|
199
|
+
title: {
|
|
200
|
+
type: PropType<SlotContent>;
|
|
201
|
+
default: undefined;
|
|
202
|
+
};
|
|
203
|
+
/** Replace the default icon, or pass `null` to omit it. */
|
|
204
|
+
icon: {
|
|
205
|
+
type: PropType<SlotContent | null>;
|
|
206
|
+
default: undefined;
|
|
207
|
+
};
|
|
208
|
+
/** Show a dismiss button. */
|
|
209
|
+
dismissible: {
|
|
210
|
+
type: BooleanConstructor;
|
|
211
|
+
default: boolean;
|
|
212
|
+
};
|
|
213
|
+
/** Buttons or links under the message. */
|
|
214
|
+
actions: {
|
|
215
|
+
type: PropType<SlotContent>;
|
|
216
|
+
default: undefined;
|
|
217
|
+
};
|
|
218
|
+
variant: {
|
|
219
|
+
type: PropType<AlertVariant>;
|
|
220
|
+
default: string;
|
|
221
|
+
};
|
|
222
|
+
}>> & Readonly<{
|
|
223
|
+
onDismiss?: ((...args: any[]) => any) | undefined;
|
|
224
|
+
}>, {
|
|
225
|
+
title: SlotContent;
|
|
226
|
+
icon: SlotContent;
|
|
227
|
+
variant: AlertVariant;
|
|
228
|
+
tone: AlertTone;
|
|
229
|
+
dismissible: boolean;
|
|
230
|
+
actions: SlotContent;
|
|
231
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
232
|
+
/**
|
|
233
|
+
* A full-width page-level message — the Vue counterpart of `@ansh-ui/react`'s `Banner`. Maintenance
|
|
234
|
+
* windows, trial expiry, a failed payment.
|
|
235
|
+
*
|
|
236
|
+
* Distinct from `Alert` in placement and weight rather than in mechanics: a banner concerns the
|
|
237
|
+
* whole application, an alert concerns the thing next to it. Implemented as a thin wrapper over
|
|
238
|
+
* `Alert` (fixed `variant="solid"`), forwarding every slot.
|
|
239
|
+
*/
|
|
240
|
+
declare const Banner: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
241
|
+
tone: {
|
|
242
|
+
type: PropType<AlertTone>;
|
|
243
|
+
default: string;
|
|
244
|
+
};
|
|
245
|
+
title: {
|
|
246
|
+
type: PropType<SlotContent>;
|
|
247
|
+
default: undefined;
|
|
248
|
+
};
|
|
249
|
+
icon: {
|
|
250
|
+
type: PropType<SlotContent | null>;
|
|
251
|
+
default: undefined;
|
|
252
|
+
};
|
|
253
|
+
dismissible: {
|
|
254
|
+
type: BooleanConstructor;
|
|
255
|
+
default: boolean;
|
|
256
|
+
};
|
|
257
|
+
actions: {
|
|
258
|
+
type: PropType<SlotContent>;
|
|
259
|
+
default: undefined;
|
|
260
|
+
};
|
|
261
|
+
/** Pin to the top of the viewport. */
|
|
262
|
+
sticky: {
|
|
263
|
+
type: BooleanConstructor;
|
|
264
|
+
default: boolean;
|
|
265
|
+
};
|
|
266
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
267
|
+
[key: string]: any;
|
|
268
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "dismiss"[], "dismiss", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
269
|
+
tone: {
|
|
270
|
+
type: PropType<AlertTone>;
|
|
271
|
+
default: string;
|
|
272
|
+
};
|
|
273
|
+
title: {
|
|
274
|
+
type: PropType<SlotContent>;
|
|
275
|
+
default: undefined;
|
|
276
|
+
};
|
|
277
|
+
icon: {
|
|
278
|
+
type: PropType<SlotContent | null>;
|
|
279
|
+
default: undefined;
|
|
280
|
+
};
|
|
281
|
+
dismissible: {
|
|
282
|
+
type: BooleanConstructor;
|
|
283
|
+
default: boolean;
|
|
284
|
+
};
|
|
285
|
+
actions: {
|
|
286
|
+
type: PropType<SlotContent>;
|
|
287
|
+
default: undefined;
|
|
288
|
+
};
|
|
289
|
+
/** Pin to the top of the viewport. */
|
|
290
|
+
sticky: {
|
|
291
|
+
type: BooleanConstructor;
|
|
292
|
+
default: boolean;
|
|
293
|
+
};
|
|
294
|
+
}>> & Readonly<{
|
|
295
|
+
onDismiss?: ((...args: any[]) => any) | undefined;
|
|
296
|
+
}>, {
|
|
297
|
+
sticky: boolean;
|
|
298
|
+
title: SlotContent;
|
|
299
|
+
icon: SlotContent;
|
|
300
|
+
tone: AlertTone;
|
|
301
|
+
dismissible: boolean;
|
|
302
|
+
actions: SlotContent;
|
|
303
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
304
|
+
/**
|
|
305
|
+
* A documentation callout — the Vue counterpart of `@ansh-ui/react`'s `Callout`.
|
|
306
|
+
*
|
|
307
|
+
* Deliberately **not** a live region. Prose asides are part of the page's content and are read in
|
|
308
|
+
* document order; announcing them out of sequence would be disruptive rather than helpful, which is
|
|
309
|
+
* the opposite of what `Alert` is for.
|
|
310
|
+
*/
|
|
311
|
+
declare const Callout: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
312
|
+
/** Short label — "Note", "Tip", "Warning". */
|
|
313
|
+
label: {
|
|
314
|
+
type: StringConstructor;
|
|
315
|
+
default: undefined;
|
|
316
|
+
};
|
|
317
|
+
tone: {
|
|
318
|
+
type: PropType<AlertTone>;
|
|
319
|
+
default: string;
|
|
320
|
+
};
|
|
321
|
+
icon: {
|
|
322
|
+
type: PropType<SlotContent>;
|
|
323
|
+
default: undefined;
|
|
324
|
+
};
|
|
325
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
326
|
+
[key: string]: any;
|
|
327
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
328
|
+
/** Short label — "Note", "Tip", "Warning". */
|
|
329
|
+
label: {
|
|
330
|
+
type: StringConstructor;
|
|
331
|
+
default: undefined;
|
|
332
|
+
};
|
|
333
|
+
tone: {
|
|
334
|
+
type: PropType<AlertTone>;
|
|
335
|
+
default: string;
|
|
336
|
+
};
|
|
337
|
+
icon: {
|
|
338
|
+
type: PropType<SlotContent>;
|
|
339
|
+
default: undefined;
|
|
340
|
+
};
|
|
341
|
+
}>> & Readonly<{}>, {
|
|
342
|
+
label: string;
|
|
343
|
+
icon: SlotContent;
|
|
344
|
+
tone: AlertTone;
|
|
345
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* The Vue plugin.
|
|
349
|
+
*
|
|
350
|
+
* Optional. Importing components directly is the tree-shakeable path and what most applications
|
|
351
|
+
* should do; this exists for two cases where global registration is genuinely better:
|
|
352
|
+
*
|
|
353
|
+
* 1. **Prototyping and playgrounds**, where per-file imports are friction.
|
|
354
|
+
* 2. **Applications with runtime-compiled templates** (a CMS, a low-code builder), where the
|
|
355
|
+
* component name is a string and cannot be statically imported at all.
|
|
356
|
+
*
|
|
357
|
+
* It also provides the single place to apply app-wide motion configuration, which is the React
|
|
358
|
+
* package's `<MotionConfig>` equivalent.
|
|
359
|
+
*
|
|
360
|
+
* ## Why the application components are imported by name rather than `import * as`
|
|
361
|
+
*
|
|
362
|
+
* The effects and behaviours (`./components/index`) get the blanket `import * as` treatment because
|
|
363
|
+
* that module exports *only* components — every named export is safe to hand to `app.component()`.
|
|
364
|
+
* The application-layer modules don't have that property: `form/listbox.ts` exports `OptionList` (a
|
|
365
|
+
* component) alongside `filterOptions`, `firstEnabled`, `stepActive` and `useTypeahead` (plain
|
|
366
|
+
* functions), and several others mix a component with its `useXxx` composable or context accessor
|
|
367
|
+
* the same way. A blanket spread would hand those functions to `app.component()` too, which either
|
|
368
|
+
* throws or silently registers something that isn't a component — so every application component
|
|
369
|
+
* is imported and listed explicitly here instead.
|
|
370
|
+
*/
|
|
371
|
+
interface AnshPluginOptions {
|
|
372
|
+
/**
|
|
373
|
+
* Prefix for globally registered component names. Default `'Ansh'`, giving
|
|
374
|
+
* `<AnshAuroraBackground>`. Pass `''` for the bare names.
|
|
375
|
+
*/
|
|
376
|
+
prefix?: string;
|
|
377
|
+
/** Register components globally. Default `true`. */
|
|
378
|
+
registerComponents?: boolean;
|
|
379
|
+
/**
|
|
380
|
+
* Application-level reduced-motion override.
|
|
381
|
+
*
|
|
382
|
+
* `'always'` is genuinely useful in production as the backing for an in-app "reduce motion"
|
|
383
|
+
* setting — many users who want calmer interfaces have never found the OS toggle.
|
|
384
|
+
*/
|
|
385
|
+
reducedMotion?: ReducedMotionMode;
|
|
386
|
+
/** Global playback rate. `0.5` is slow motion across every animation. Default `1`. */
|
|
387
|
+
timeScale?: number;
|
|
388
|
+
/** Pin adaptive quality. Omit to let the frame budget decide, which is almost always right. */
|
|
389
|
+
quality?: number;
|
|
390
|
+
/**
|
|
391
|
+
* Pause every animation while the document is hidden. Default `true`.
|
|
392
|
+
*
|
|
393
|
+
* Leave this on. Animating a background tab burns battery and spins fans for output nobody can
|
|
394
|
+
* see.
|
|
395
|
+
*/
|
|
396
|
+
pauseWhenHidden?: boolean;
|
|
397
|
+
/** Also pause when the window loses focus. Default `false`. */
|
|
398
|
+
pauseWhenBlurred?: boolean;
|
|
399
|
+
/** Reduce quality on low battery where the platform exposes it. Default `true`. */
|
|
400
|
+
respectBattery?: boolean;
|
|
401
|
+
}
|
|
402
|
+
declare const AnshPlugin: Plugin<AnshPluginOptions[]>;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* @ansh-ui/vue — Ansh for Vue 3 and Nuxt.
|
|
406
|
+
*
|
|
407
|
+
* Every component is a thin binding over `@ansh-ui/core`. The engine owns all behaviour; this
|
|
408
|
+
* package owns the Vue lifecycle, reactivity boundaries and SSR correctness.
|
|
409
|
+
*
|
|
410
|
+
* ```vue
|
|
411
|
+
* <script setup>
|
|
412
|
+
* import { AuroraBackground, AnimatedText, MagneticButton } from '@ansh-ui/vue'
|
|
413
|
+
* </script>
|
|
414
|
+
*
|
|
415
|
+
* <template>
|
|
416
|
+
* <AuroraBackground :colors="['#0275f4', '#9f0550']" class="hero">
|
|
417
|
+
* <AnimatedText text="Motion, refined." by="chars" from="center" />
|
|
418
|
+
* <MagneticButton :strength="16">Get started</MagneticButton>
|
|
419
|
+
* </AuroraBackground>
|
|
420
|
+
* </template>
|
|
421
|
+
* ```
|
|
422
|
+
*
|
|
423
|
+
* For Nuxt, install `@ansh-ui/nuxt` instead — it registers every component for auto-import and
|
|
424
|
+
* handles the SSR transpile.
|
|
425
|
+
*
|
|
426
|
+
* ## Designed UI components
|
|
427
|
+
*
|
|
428
|
+
* Everything under "Forms" / "Overlays" / "Data" / "Navigation" / "Feedback" / "Layout" below needs
|
|
429
|
+
* the stylesheet:
|
|
430
|
+
*
|
|
431
|
+
* ```ts
|
|
432
|
+
* import '@ansh-ui/tokens/ansh.css'
|
|
433
|
+
* import '@ansh-ui/vue/styles.css'
|
|
434
|
+
* ```
|
|
435
|
+
*/
|
|
436
|
+
|
|
437
|
+
declare const VERSION = "0.1.0";
|
|
438
|
+
|
|
439
|
+
export { Alert, type AlertTone, type AlertVariant, AnimatedGradient, AnshPlugin, type AnshPluginOptions, AuroraBackground, Banner, type BehaviourComponentBaseProps, Callout, Constellation, type EffectComponentBaseProps, Fireflies, LiquidBlob, MagneticButton, Marquee, MeshGradient, MeteorShower, NoiseLayer, Parallax, ParticleField, Rain, Ripple, ScrollReveal, SlotContent, Snow, Spotlight, TiltCard, VERSION, type VueBehaviourComponent, type VueEffectComponent, Waves, createBehaviourComponent, createEffectComponent, useBehaviour };
|