@raylang/elements 0.9.0 → 0.10.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/core/complete.js +17 -8
- package/custom-elements.json +24 -0
- package/llms-full.txt +7 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
package/core/complete.js
CHANGED
|
@@ -42,7 +42,8 @@ export const completeStyles = css`
|
|
|
42
42
|
white-space: nowrap;
|
|
43
43
|
}
|
|
44
44
|
.suggestion[aria-selected="true"] { color: var(--ray-accent-foreground); background: var(--ray-accent); }
|
|
45
|
-
.suggestion .s-
|
|
45
|
+
.suggestion .s-main { flex: none; }
|
|
46
|
+
.suggestion .s-label { font-family: var(--ray-font-mono); }
|
|
46
47
|
.suggestion .s-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ray-muted-foreground); }
|
|
47
48
|
.suggestion .s-description { display: block; font-size: var(--ray-font-size-xs); color: var(--ray-muted-foreground); }
|
|
48
49
|
`;
|
|
@@ -127,22 +128,30 @@ class Completer {
|
|
|
127
128
|
option.dataset.index = String(i);
|
|
128
129
|
option.setAttribute("role", "option");
|
|
129
130
|
option.setAttribute("part", "suggestion");
|
|
131
|
+
// The label (code, in the mono font) with the description (prose)
|
|
132
|
+
// under it, then the detail.
|
|
133
|
+
const main = document.createElement("span");
|
|
134
|
+
main.className = "s-main";
|
|
130
135
|
const label = document.createElement("span");
|
|
131
136
|
label.className = "s-label";
|
|
137
|
+
label.setAttribute("part", "suggestion-label");
|
|
132
138
|
label.textContent = item.label ?? String(item.value);
|
|
133
|
-
|
|
139
|
+
main.append(label);
|
|
140
|
+
if (item.description) {
|
|
141
|
+
const d = document.createElement("span");
|
|
142
|
+
d.className = "s-description";
|
|
143
|
+
d.setAttribute("part", "suggestion-description");
|
|
144
|
+
d.textContent = item.description;
|
|
145
|
+
main.append(d);
|
|
146
|
+
}
|
|
147
|
+
option.append(main);
|
|
134
148
|
if (item.detail) {
|
|
135
149
|
const detail = document.createElement("span");
|
|
136
150
|
detail.className = "s-detail";
|
|
151
|
+
detail.setAttribute("part", "suggestion-detail");
|
|
137
152
|
detail.textContent = item.detail;
|
|
138
153
|
option.append(detail);
|
|
139
154
|
}
|
|
140
|
-
if (item.description) {
|
|
141
|
-
const d = document.createElement("span");
|
|
142
|
-
d.className = "s-description";
|
|
143
|
-
d.textContent = item.description;
|
|
144
|
-
label.append(d);
|
|
145
|
-
}
|
|
146
155
|
return option;
|
|
147
156
|
}));
|
|
148
157
|
const keep = this.open ? this.open.items[this.open.index]?.value : undefined;
|
package/custom-elements.json
CHANGED
|
@@ -4814,6 +4814,18 @@
|
|
|
4814
4814
|
"name": "suggestion",
|
|
4815
4815
|
"description": "Each suggestion ([aria-selected] when active)."
|
|
4816
4816
|
},
|
|
4817
|
+
{
|
|
4818
|
+
"name": "suggestion-label",
|
|
4819
|
+
"description": "A suggestion's label (in the mono font)."
|
|
4820
|
+
},
|
|
4821
|
+
{
|
|
4822
|
+
"name": "suggestion-detail",
|
|
4823
|
+
"description": "A suggestion's detail."
|
|
4824
|
+
},
|
|
4825
|
+
{
|
|
4826
|
+
"name": "suggestion-description",
|
|
4827
|
+
"description": "A suggestion's description, under its label (in the interface font)."
|
|
4828
|
+
},
|
|
4817
4829
|
{
|
|
4818
4830
|
"name": "highlight",
|
|
4819
4831
|
"description": "Each marked range (also highlight-<kind> for a range with a kind)."
|
|
@@ -9575,6 +9587,18 @@
|
|
|
9575
9587
|
"name": "suggestion",
|
|
9576
9588
|
"description": "Each suggestion ([aria-selected] when active)."
|
|
9577
9589
|
},
|
|
9590
|
+
{
|
|
9591
|
+
"name": "suggestion-label",
|
|
9592
|
+
"description": "A suggestion's label (in the mono font)."
|
|
9593
|
+
},
|
|
9594
|
+
{
|
|
9595
|
+
"name": "suggestion-detail",
|
|
9596
|
+
"description": "A suggestion's detail."
|
|
9597
|
+
},
|
|
9598
|
+
{
|
|
9599
|
+
"name": "suggestion-description",
|
|
9600
|
+
"description": "A suggestion's description, under its label (in the interface font)."
|
|
9601
|
+
},
|
|
9578
9602
|
{
|
|
9579
9603
|
"name": "highlight",
|
|
9580
9604
|
"description": "Each marked range (also highlight-<kind> for a range with a kind)."
|
package/llms-full.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ray-elements
|
|
2
2
|
|
|
3
|
-
> Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.
|
|
3
|
+
> Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.10.0.
|
|
4
4
|
|
|
5
5
|
ray-elements is a design system of standard web components (custom elements
|
|
6
6
|
with Shadow DOM, no dependencies): `<ray-button>`, `<ray-input>`,
|
|
@@ -935,6 +935,9 @@ Parts (`::part()`):
|
|
|
935
935
|
- `error`: The error message.
|
|
936
936
|
- `suggestions`: The suggestion list (a listbox in the top layer).
|
|
937
937
|
- `suggestion`: Each suggestion ([aria-selected] when active).
|
|
938
|
+
- `suggestion-label`: A suggestion's label (in the mono font).
|
|
939
|
+
- `suggestion-detail`: A suggestion's detail.
|
|
940
|
+
- `suggestion-description`: A suggestion's description, under its label (in the interface font).
|
|
938
941
|
- `highlight`: Each marked range (also highlight-<kind> for a range with a kind).
|
|
939
942
|
- `text-layer`: The layer behind the text that holds the marks.
|
|
940
943
|
|
|
@@ -1486,6 +1489,9 @@ Parts (`::part()`):
|
|
|
1486
1489
|
- `wrapper`: The box.
|
|
1487
1490
|
- `suggestions`: The suggestion list (a listbox in the top layer).
|
|
1488
1491
|
- `suggestion`: Each suggestion ([aria-selected] when active).
|
|
1492
|
+
- `suggestion-label`: A suggestion's label (in the mono font).
|
|
1493
|
+
- `suggestion-detail`: A suggestion's detail.
|
|
1494
|
+
- `suggestion-description`: A suggestion's description, under its label (in the interface font).
|
|
1489
1495
|
- `highlight`: Each marked range (also highlight-<kind> for a range with a kind).
|
|
1490
1496
|
- `text-layer`: The layer behind the text that holds the marks.
|
|
1491
1497
|
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ray-elements
|
|
2
2
|
|
|
3
|
-
> Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.
|
|
3
|
+
> Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.10.0.
|
|
4
4
|
|
|
5
5
|
ray-elements is a design system of standard web components (custom elements
|
|
6
6
|
with Shadow DOM, no dependencies): `<ray-button>`, `<ray-input>`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raylang/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Web components for any app, with raylang extras (shadcn/ui + Mantine inspired)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": ["web-components", "custom-elements", "design-system", "ui", "raylang"],
|