@raylang/vue 0.11.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.
- package/components/menu.js +1 -1
- package/components/popover.js +1 -1
- package/index.d.ts +14 -0
- package/package.json +2 -2
package/components/menu.js
CHANGED
|
@@ -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
|
});
|
package/components/popover.js
CHANGED
|
@@ -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
|
});
|
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. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raylang/vue",
|
|
3
|
-
"version": "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.
|
|
31
|
+
"@raylang/elements": "^0.12.0",
|
|
32
32
|
"vue": ">=3.3"
|
|
33
33
|
}
|
|
34
34
|
}
|