@ousi-ui/vue 0.4.0 → 0.4.1

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/index.d.ts CHANGED
@@ -580,16 +580,23 @@ required: boolean;
580
580
  allowDuplicates: boolean;
581
581
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
582
582
 
583
- declare const __VLS_component_55: DefineComponent<ContextMenuProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
583
+ declare const __VLS_component_55: DefineComponent<ContextMenuProps, {
584
+ show: typeof show;
585
+ hide: typeof hide;
586
+ isOpen: Ref<boolean, boolean>;
587
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
584
588
  select: (key: string, item: ContextMenuItem) => any;
589
+ close: () => any;
590
+ open: () => any;
585
591
  }, string, PublicProps, Readonly<ContextMenuProps> & Readonly<{
586
592
  onSelect?: ((key: string, item: ContextMenuItem) => any) | undefined;
593
+ onClose?: (() => any) | undefined;
594
+ onOpen?: (() => any) | undefined;
587
595
  }>, {
588
596
  shadow: ContextMenuShadow;
589
597
  disabled: boolean;
590
- }, {}, {}, {}, string, ComponentProvideOptions, false, {
591
- menuRef: HTMLDivElement;
592
- }, any>;
598
+ submenuOffset: number;
599
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
593
600
 
594
601
  declare const __VLS_component_56: DefineComponent<MarqueeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<MarqueeProps> & Readonly<{}>, {
595
602
  direction: MarqueeDirection;
@@ -1345,10 +1352,11 @@ declare function __VLS_template_55(): {
1345
1352
  attrs: Partial<{}>;
1346
1353
  slots: {
1347
1354
  default?(_: {}): any;
1355
+ icon?(_: {
1356
+ item: ContextMenuItem;
1357
+ }): any;
1348
1358
  };
1349
- refs: {
1350
- menuRef: HTMLDivElement;
1351
- };
1359
+ refs: {};
1352
1360
  rootEl: any;
1353
1361
  };
1354
1362
 
@@ -3051,36 +3059,82 @@ export declare interface ConfettiProps {
3051
3059
 
3052
3060
  export declare const confettiTheme = "fixed inset-0 pointer-events-none z-[9999] overflow-hidden";
3053
3061
 
3062
+ export declare const contextMenuChevronTheme = "ml-auto size-3.5 text-ousi-muted shrink-0";
3063
+
3054
3064
  export declare interface ContextMenuEmits {
3065
+ /** Fired when a leaf item is selected. */
3055
3066
  'select': [key: string, item: ContextMenuItem];
3067
+ /** Fired when the menu opens. */
3068
+ 'open': [];
3069
+ /** Fired when the menu closes. */
3070
+ 'close': [];
3056
3071
  }
3057
3072
 
3073
+ /** Exposed imperative methods on OContextMenu (via template ref). */
3074
+ export declare interface ContextMenuExposed {
3075
+ /** Open the menu programmatically. Accepts a MouseEvent (uses clientX/clientY)
3076
+ * or a coordinate pair. Calling without args opens at (0, 0). */
3077
+ show: (input?: MouseEvent | {
3078
+ x: number;
3079
+ y: number;
3080
+ }) => void;
3081
+ /** Close the menu programmatically. */
3082
+ hide: () => void;
3083
+ /** Reactive open state. */
3084
+ isOpen: Ref<boolean>;
3085
+ }
3086
+
3087
+ /** Section heading — uppercase muted, non-interactive. */
3088
+ export declare const contextMenuHeadingTheme: string;
3089
+
3090
+ export declare const contextMenuIconTheme = "size-4 text-ousi-muted shrink-0";
3091
+
3058
3092
  export declare interface ContextMenuItem {
3059
- label: string;
3060
- key: string;
3061
- icon?: string;
3093
+ /** Item key — emitted on `select`. Falls back to `label` if not provided. */
3094
+ key?: string;
3095
+ /** Visible label. Required unless `separator: true`. */
3096
+ label?: string;
3097
+ /** Icon — string (treated as a CSS class), a Vue component, or anything renderable.
3098
+ * For full control (e.g. Hugeicons array format), use the per-item `#icon` slot. */
3099
+ icon?: string | Component | any;
3100
+ /** Right-aligned keyboard shortcut hint (e.g. '⌘C'). Hidden when the item has children. */
3062
3101
  shortcut?: string;
3102
+ /** Disable the item — not focusable, not selectable. */
3063
3103
  disabled?: boolean;
3104
+ /** Render label in danger color. */
3064
3105
  danger?: boolean;
3106
+ /** Render as a horizontal separator line. Other fields are ignored. */
3065
3107
  separator?: boolean;
3108
+ /** Render as a section heading — uppercase muted text, non-interactive, skipped in keyboard nav. */
3109
+ heading?: boolean;
3110
+ /** Keep the menu open after selecting this item. Useful for toggles (column visibility, etc.). */
3111
+ keepOpen?: boolean;
3112
+ /** Nested submenu items. When present, the item opens a submenu instead of being selected. */
3113
+ children?: ContextMenuItem[];
3066
3114
  }
3067
3115
 
3068
- export declare const contextMenuItemTheme = "flex items-center gap-2 rounded-ousi-lg px-3 py-1.5 text-sm text-ousi-foreground cursor-pointer transition-colors hover:bg-ousi-default outline-none focus-visible:bg-ousi-default";
3116
+ export declare const contextMenuItemTheme: string;
3069
3117
 
3070
3118
  export declare interface ContextMenuProps {
3119
+ /** Items to render in the menu. */
3071
3120
  items: ContextMenuItem[];
3121
+ /** Disable right-click activation on the trigger slot. */
3072
3122
  disabled?: boolean;
3073
3123
  /** Elevation shadow. Defaults to 'lg'. */
3074
3124
  shadow?: ContextMenuShadow;
3125
+ /** Pixel gap between a parent item and its open submenu. Defaults to 4. */
3126
+ submenuOffset?: number;
3127
+ /** Additional CSS classes on the menu surface. */
3075
3128
  class?: string;
3076
3129
  }
3077
3130
 
3078
- export declare const contextMenuSeparatorTheme = "my-1 h-px bg-ousi-border/50";
3131
+ export declare const contextMenuSeparatorTheme = "my-1 mx-1 h-px bg-ousi-border/40";
3079
3132
 
3080
- declare type ContextMenuShadow = 'sm' | 'md' | 'lg' | 'xl';
3133
+ export declare type ContextMenuShadow = 'sm' | 'md' | 'lg' | 'xl';
3081
3134
 
3082
- export declare const contextMenuShortcutTheme = "ml-auto text-xs text-ousi-muted";
3135
+ export declare const contextMenuShortcutTheme = "ml-auto text-xs text-ousi-muted tracking-wide";
3083
3136
 
3137
+ /** Menu surface — no border, just shadow on overlay bg (matches Popover styling). */
3084
3138
  export declare const contextMenuTheme: (props?: ({
3085
3139
  shadow?: "sm" | "md" | "lg" | "xl" | null | undefined;
3086
3140
  } & ClassProp) | undefined) => string;
@@ -3668,6 +3722,8 @@ export declare interface GradientTextProps {
3668
3722
 
3669
3723
  export declare const gradientTextTheme = "inline-block bg-clip-text text-transparent";
3670
3724
 
3725
+ declare function hide(): void;
3726
+
3671
3727
  /** Divider line. */
3672
3728
  export declare const imageCompareDividerTheme = "absolute z-20 bg-white/80 shadow-sm";
3673
3729
 
@@ -5237,6 +5293,11 @@ export declare const separatorTheme: (props?: ({
5237
5293
 
5238
5294
  export declare type SeparatorVariant = 'default' | 'secondary' | 'tertiary';
5239
5295
 
5296
+ declare function show(input?: MouseEvent | {
5297
+ x: number;
5298
+ y: number;
5299
+ }): void;
5300
+
5240
5301
  export declare type SkeletonAnimation = 'shimmer' | 'pulse' | 'none';
5241
5302
 
5242
5303
  export declare const skeletonBaseTheme: (props?: ({