@raylang/vue 0.10.0 → 0.12.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.
@@ -4,7 +4,7 @@ import "@raylang/elements/menu";
4
4
  import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayMenu = /*#__PURE__*/ createComponent("RayMenu", "ray-menu", {
7
- properties: ["open", "placement", "context", "keepOpen", "native", "offset"],
7
+ properties: ["open", "placement", "context", "keepOpen", "native", "anchor", "offset"],
8
8
  booleans: ["open", "context", "keepOpen", "native"],
9
9
  model: { prop: "open", events: ["ray-open", "ray-close"] },
10
10
  });
@@ -4,7 +4,7 @@ import "@raylang/elements/popover";
4
4
  import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayPopover = /*#__PURE__*/ createComponent("RayPopover", "ray-popover", {
7
- properties: ["open", "placement", "offset", "width", "matchWidth", "padding", "trapFocus"],
7
+ properties: ["open", "placement", "offset", "anchor", "width", "matchWidth", "padding", "trapFocus"],
8
8
  booleans: ["open", "matchWidth", "trapFocus"],
9
9
  model: { prop: "open", events: ["ray-open", "ray-close"] },
10
10
  });
@@ -0,0 +1,9 @@
1
+ // Generated by ray-elements tools from component.toml files. Do not edit.
2
+
3
+ import "@raylang/elements/pulse";
4
+ import { createComponent } from "../create.js";
5
+
6
+ export const RayPulse = /*#__PURE__*/ createComponent("RayPulse", "ray-pulse", {
7
+ properties: ["variant", "count", "shape", "fade", "direction", "color", "size", "label"],
8
+ booleans: [],
9
+ });
package/index.d.ts CHANGED
@@ -564,6 +564,8 @@ export interface RayInputProps {
564
564
  list?: string;
565
565
  /** A suggestion was accepted (the text already has it). */
566
566
  onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
567
+ /** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
568
+ onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
567
569
  /** On every edit (value already updated). */
568
570
  onInput?: (event: Event) => void;
569
571
  /** When an edit is committed (blur, Enter). */
@@ -645,6 +647,8 @@ export interface RayModeInputProps {
645
647
  onRayModeChange?: (event: CustomEvent<{ mode: string; previous: string | null; option: Ray.ModeOption }>) => void;
646
648
  /** A suggestion was accepted (the text already has it). */
647
649
  onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
650
+ /** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
651
+ onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
648
652
  /** On every edit (value already updated). */
649
653
  onInput?: (event: Event) => void;
650
654
  /** When an edit is committed (blur, Enter). */
@@ -780,6 +784,8 @@ export interface RayPasswordInputProps {
780
784
  onRayVisibilityChange?: (event: CustomEvent<{ visible: boolean }>) => void;
781
785
  /** A suggestion was accepted (the text already has it). */
782
786
  onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
787
+ /** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
788
+ onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
783
789
  /** On every edit (value already updated). */
784
790
  onInput?: (event: Event) => void;
785
791
  /** When an edit is committed (blur, Enter). */
@@ -859,6 +865,8 @@ export interface RayPathInputProps {
859
865
  onRayError?: (event: CustomEvent<{ error: Error }>) => void;
860
866
  /** A suggestion was accepted (the text already has it). */
861
867
  onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
868
+ /** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
869
+ onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
862
870
  /** On every edit (value already updated). */
863
871
  onInput?: (event: Event) => void;
864
872
  }
@@ -1199,6 +1207,8 @@ export interface RayTextareaProps {
1199
1207
  wrap?: string;
1200
1208
  /** A suggestion was accepted (the text already has it). */
1201
1209
  onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
1210
+ /** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
1211
+ onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
1202
1212
  /** On every edit. */
1203
1213
  onInput?: (event: Event) => void;
1204
1214
  /** When an edit is committed. */
@@ -1628,6 +1638,8 @@ export interface RayMenuProps {
1628
1638
  keepOpen?: boolean;
1629
1639
  /** With a native host (ray-elements/core/raylang.js in a std/ui window), opens as the system's context menu at the pointer: items and dividers, same ray-select. */
1630
1640
  native?: boolean;
1641
+ /** What the panel is placed against instead of the trigger: an element, a DOMRect or a function returning one (a text range, the pointer; read again on every reposition). The trigger still opens it. */
1642
+ anchor?: Element | DOMRect | (() => DOMRect) | null;
1631
1643
  /** Gap to the anchor in px. */
1632
1644
  offset?: number;
1633
1645
  /** v-model: the element's `open`. */
@@ -1679,6 +1691,8 @@ export interface RayPopoverProps {
1679
1691
  placement?: "bottom" | "bottom-start" | "bottom-end" | "top" | "top-start" | "top-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
1680
1692
  /** Gap to the trigger in px. */
1681
1693
  offset?: number;
1694
+ /** What the panel is placed against instead of the trigger: an element, a DOMRect or a function returning one (a text range, the pointer; read again on every reposition). The trigger still opens it. */
1695
+ anchor?: Element | DOMRect | (() => DOMRect) | null;
1682
1696
  /** Panel width (px number or CSS length). Default: its content. */
1683
1697
  width?: string;
1684
1698
  /** At least as wide as the trigger. */
@@ -2153,6 +2167,27 @@ export interface RayProgressProps {
2153
2167
  /** <ray-progress> as a Vue component. */
2154
2168
  export declare const RayProgress: DefineComponent<RayProgressProps>;
2155
2169
 
2170
+ export interface RayPulseProps {
2171
+ /** The figure: cluster (three concentric circles breathing out of phase), breathe (one dot over a halo), ripple (rings expanding from a dot) or dots (three in a row, in sequence). */
2172
+ variant?: "cluster" | "breathe" | "ripple" | "dots";
2173
+ /** Number of circles, 1 to 5 (more are clamped). Default: the variant's. */
2174
+ count?: number;
2175
+ /** Filled discs (concentric ones fade with size, see --ray-pulse-floor) or outlined rings. Default: the variant's. */
2176
+ shape?: "filled" | "ring";
2177
+ /** Whether a cycle ends transparent; the bare attribute means out. Default: the variant's (ripple and dots fade). */
2178
+ fade?: "out" | "none";
2179
+ /** alternate goes there and back; normal goes one way and restarts (with fade: the ripple). Default: the variant's. */
2180
+ direction?: "alternate" | "normal";
2181
+ /** A palette color or any CSS color. Default: the primary color. */
2182
+ color?: string;
2183
+ /** Height of the figure (the dots variant is wider). */
2184
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
2185
+ /** Text read by screen readers. */
2186
+ label?: string;
2187
+ }
2188
+ /** <ray-pulse> as a Vue component. */
2189
+ export declare const RayPulse: DefineComponent<RayPulseProps>;
2190
+
2156
2191
  export interface RayRingProgressProps {
2157
2192
  /** Progress, from 0 to max. Unset: indeterminate (a spinning arc). */
2158
2193
  value?: number;
@@ -2501,6 +2536,7 @@ export declare const components: {
2501
2536
  RayNotification: typeof RayNotification;
2502
2537
  RayToaster: typeof RayToaster;
2503
2538
  RayProgress: typeof RayProgress;
2539
+ RayPulse: typeof RayPulse;
2504
2540
  RayRingProgress: typeof RayRingProgress;
2505
2541
  RaySkeleton: typeof RaySkeleton;
2506
2542
  RaySpinner: typeof RaySpinner;
@@ -2599,6 +2635,7 @@ declare module "vue" {
2599
2635
  RayNotification: typeof RayNotification;
2600
2636
  RayToaster: typeof RayToaster;
2601
2637
  RayProgress: typeof RayProgress;
2638
+ RayPulse: typeof RayPulse;
2602
2639
  RayRingProgress: typeof RayRingProgress;
2603
2640
  RaySkeleton: typeof RaySkeleton;
2604
2641
  RaySpinner: typeof RaySpinner;
package/index.js CHANGED
@@ -58,6 +58,7 @@ import { RayAlert } from "./components/alert.js";
58
58
  import { RayEmptyState } from "./components/empty-state.js";
59
59
  import { RayNotification, RayToaster } from "./components/notification.js";
60
60
  import { RayProgress } from "./components/progress.js";
61
+ import { RayPulse } from "./components/pulse.js";
61
62
  import { RayRingProgress } from "./components/ring-progress.js";
62
63
  import { RaySkeleton } from "./components/skeleton.js";
63
64
  import { RaySpinner } from "./components/spinner.js";
@@ -79,9 +80,9 @@ import { RayThemeToggle } from "./components/theme-toggle.js";
79
80
 
80
81
  // The factories, to wrap your own custom elements the same way.
81
82
  export { createComponent, createPlugin } from "./create.js";
82
- export { RayButton, RayButtonGroup, RayIconButton, RayToggle, RayToggleGroup, RayCheckbox, RayCheckboxGroup, RayColorPicker, RayColorInput, RayCombobox, RayDatePicker, RayCalendar, RayFileUpload, RayInput, RayModeInput, RayNumberInput, RayPasswordInput, RayPathInput, RayRadioGroup, RayRadio, RayRadioCard, RaySearch, RaySegmentedControl, RaySelect, RaySlider, RaySwitch, RayTextarea, RayBottomNav, RayBottomNavItem, RayBreadcrumbs, RayBreadcrumb, RayDocTabs, RayDocTab, RayNavLink, RayPagination, RaySidebar, RaySidebarGroup, RayStepper, RayStep, RayTabs, RayTab, RayTabPanel, RayCommandPalette, RayDialog, RayDrawer, RayMenu, RayMenuItem, RayMenuLabel, RayMenuDivider, RayPopover, RayTooltip, RayAccordion, RayAccordionItem, RayAttachment, RayAttachments, RayAvatar, RayBadge, RayBlockquote, RayCarousel, RayCode, RayIcon, RayIndicator, RayKbd, RayStat, RayTable, RayTimeline, RayTimelineItem, RayAlert, RayEmptyState, RayNotification, RayToaster, RayProgress, RayRingProgress, RaySkeleton, RaySpinner, RayStepDots, RayAppBar, RayAppShell, RayAspectRatio, RayCard, RayCenter, RayContainer, RayGrid, RayGroup, RayScrollArea, RaySeparator, RaySplit, RayStack, RayStatusbar, RayStatusbarItem, RayThemeToggle };
83
+ export { RayButton, RayButtonGroup, RayIconButton, RayToggle, RayToggleGroup, RayCheckbox, RayCheckboxGroup, RayColorPicker, RayColorInput, RayCombobox, RayDatePicker, RayCalendar, RayFileUpload, RayInput, RayModeInput, RayNumberInput, RayPasswordInput, RayPathInput, RayRadioGroup, RayRadio, RayRadioCard, RaySearch, RaySegmentedControl, RaySelect, RaySlider, RaySwitch, RayTextarea, RayBottomNav, RayBottomNavItem, RayBreadcrumbs, RayBreadcrumb, RayDocTabs, RayDocTab, RayNavLink, RayPagination, RaySidebar, RaySidebarGroup, RayStepper, RayStep, RayTabs, RayTab, RayTabPanel, RayCommandPalette, RayDialog, RayDrawer, RayMenu, RayMenuItem, RayMenuLabel, RayMenuDivider, RayPopover, RayTooltip, RayAccordion, RayAccordionItem, RayAttachment, RayAttachments, RayAvatar, RayBadge, RayBlockquote, RayCarousel, RayCode, RayIcon, RayIndicator, RayKbd, RayStat, RayTable, RayTimeline, RayTimelineItem, RayAlert, RayEmptyState, RayNotification, RayToaster, RayProgress, RayPulse, RayRingProgress, RaySkeleton, RaySpinner, RayStepDots, RayAppBar, RayAppShell, RayAspectRatio, RayCard, RayCenter, RayContainer, RayGrid, RayGroup, RayScrollArea, RaySeparator, RaySplit, RayStack, RayStatusbar, RayStatusbarItem, RayThemeToggle };
83
84
 
84
- export const components = { RayButton, RayButtonGroup, RayIconButton, RayToggle, RayToggleGroup, RayCheckbox, RayCheckboxGroup, RayColorPicker, RayColorInput, RayCombobox, RayDatePicker, RayCalendar, RayFileUpload, RayInput, RayModeInput, RayNumberInput, RayPasswordInput, RayPathInput, RayRadioGroup, RayRadio, RayRadioCard, RaySearch, RaySegmentedControl, RaySelect, RaySlider, RaySwitch, RayTextarea, RayBottomNav, RayBottomNavItem, RayBreadcrumbs, RayBreadcrumb, RayDocTabs, RayDocTab, RayNavLink, RayPagination, RaySidebar, RaySidebarGroup, RayStepper, RayStep, RayTabs, RayTab, RayTabPanel, RayCommandPalette, RayDialog, RayDrawer, RayMenu, RayMenuItem, RayMenuLabel, RayMenuDivider, RayPopover, RayTooltip, RayAccordion, RayAccordionItem, RayAttachment, RayAttachments, RayAvatar, RayBadge, RayBlockquote, RayCarousel, RayCode, RayIcon, RayIndicator, RayKbd, RayStat, RayTable, RayTimeline, RayTimelineItem, RayAlert, RayEmptyState, RayNotification, RayToaster, RayProgress, RayRingProgress, RaySkeleton, RaySpinner, RayStepDots, RayAppBar, RayAppShell, RayAspectRatio, RayCard, RayCenter, RayContainer, RayGrid, RayGroup, RayScrollArea, RaySeparator, RaySplit, RayStack, RayStatusbar, RayStatusbarItem, RayThemeToggle };
85
+ export const components = { RayButton, RayButtonGroup, RayIconButton, RayToggle, RayToggleGroup, RayCheckbox, RayCheckboxGroup, RayColorPicker, RayColorInput, RayCombobox, RayDatePicker, RayCalendar, RayFileUpload, RayInput, RayModeInput, RayNumberInput, RayPasswordInput, RayPathInput, RayRadioGroup, RayRadio, RayRadioCard, RaySearch, RaySegmentedControl, RaySelect, RaySlider, RaySwitch, RayTextarea, RayBottomNav, RayBottomNavItem, RayBreadcrumbs, RayBreadcrumb, RayDocTabs, RayDocTab, RayNavLink, RayPagination, RaySidebar, RaySidebarGroup, RayStepper, RayStep, RayTabs, RayTab, RayTabPanel, RayCommandPalette, RayDialog, RayDrawer, RayMenu, RayMenuItem, RayMenuLabel, RayMenuDivider, RayPopover, RayTooltip, RayAccordion, RayAccordionItem, RayAttachment, RayAttachments, RayAvatar, RayBadge, RayBlockquote, RayCarousel, RayCode, RayIcon, RayIndicator, RayKbd, RayStat, RayTable, RayTimeline, RayTimelineItem, RayAlert, RayEmptyState, RayNotification, RayToaster, RayProgress, RayPulse, RayRingProgress, RaySkeleton, RaySpinner, RayStepDots, RayAppBar, RayAppShell, RayAspectRatio, RayCard, RayCenter, RayContainer, RayGrid, RayGroup, RayScrollArea, RaySeparator, RaySplit, RayStack, RayStatusbar, RayStatusbarItem, RayThemeToggle };
85
86
 
86
87
  /** app.use(RayElements) registers every component globally. */
87
88
  export const RayElements = /*#__PURE__*/ createPlugin(components);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raylang/vue",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Vue 3 wrappers (with v-model) of the ray-elements web components",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": ["web-components", "design-system", "ui", "raylang", "vue"],
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "sideEffects": false,
30
30
  "peerDependencies": {
31
- "@raylang/elements": "^0.10.0",
31
+ "@raylang/elements": "^0.12.0",
32
32
  "vue": ">=3.3"
33
33
  }
34
34
  }