@estiva-app/ui 0.73.0 → 0.74.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/CommandPalette.d.ts +3 -1
- package/dist/CommandPalette.d.ts.map +1 -1
- package/dist/CommentHighlights.d.ts.map +1 -1
- package/dist/ComposerTriggers.d.ts +7 -0
- package/dist/ComposerTriggers.d.ts.map +1 -1
- package/dist/Menu.d.ts +8 -2
- package/dist/Menu.d.ts.map +1 -1
- package/dist/SuggestionMenu.d.ts +2 -0
- package/dist/SuggestionMenu.d.ts.map +1 -1
- package/dist/editor.js +49 -18
- package/dist/editor.js.map +3 -3
- package/dist/index.js +10 -4
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/registry.json +7 -1
- package/src/CommandPalette.test.tsx +6 -0
- package/src/CommandPalette.tsx +4 -1
- package/src/CommentHighlights.test.ts +56 -2
- package/src/CommentHighlights.ts +51 -12
- package/src/ComposerTriggers.test.tsx +21 -0
- package/src/ComposerTriggers.tsx +14 -1
- package/src/Menu.tsx +19 -5
- package/src/SuggestionMenu.tsx +4 -1
package/dist/index.js
CHANGED
|
@@ -1271,12 +1271,15 @@ function menuItemClassName({ size, selected, className }) {
|
|
|
1271
1271
|
className
|
|
1272
1272
|
);
|
|
1273
1273
|
}
|
|
1274
|
-
function MenuItemBody({ label, children, size = "default", description, leading, trailing, hint, shortcut, submenu, destructive, selected }) {
|
|
1274
|
+
function MenuItemBody({ label, children, size = "default", description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected }) {
|
|
1275
1275
|
const edge = trailing ?? (shortcut ? /* @__PURE__ */ jsx20(Kbd, { children: shortcut }) : submenu ? /* @__PURE__ */ jsx20(IconChevronRight, { size: 16, stroke: 1.5, className: "shrink-0 text-text-muted" }) : null);
|
|
1276
1276
|
return /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
1277
1277
|
leading && /* @__PURE__ */ jsx20("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
1278
1278
|
children ?? /* @__PURE__ */ jsxs12("span", { className: cn("flex min-w-0 flex-1 flex-col", size === "tall" && "gap-[2px]"), children: [
|
|
1279
|
-
/* @__PURE__ */
|
|
1279
|
+
aside ? /* @__PURE__ */ jsxs12("span", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
1280
|
+
/* @__PURE__ */ jsx20("span", { className: cn("truncate text-body-2", destructive ? "text-error-default" : "text-text-primary"), children: label }),
|
|
1281
|
+
/* @__PURE__ */ jsx20("span", { className: "shrink-0 text-caption text-text-muted", children: aside })
|
|
1282
|
+
] }) : /* @__PURE__ */ jsx20("span", { className: cn("truncate text-body-2", destructive ? "text-error-default" : "text-text-primary"), children: label }),
|
|
1280
1283
|
description && /* @__PURE__ */ jsx20("span", { className: "truncate text-caption text-text-secondary", children: description })
|
|
1281
1284
|
] }),
|
|
1282
1285
|
(edge || hint) && // One grid cell holding both, right-aligned: the slot is as wide as
|
|
@@ -1289,13 +1292,14 @@ function MenuItemBody({ label, children, size = "default", description, leading,
|
|
|
1289
1292
|
] })
|
|
1290
1293
|
] });
|
|
1291
1294
|
}
|
|
1292
|
-
function MenuItem({ label, children, size = "default", description, leading, trailing, hint, shortcut, submenu, destructive, selected, className, ...props }) {
|
|
1295
|
+
function MenuItem({ label, children, size = "default", description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected, className, ...props }) {
|
|
1293
1296
|
const body = /* @__PURE__ */ jsx20(
|
|
1294
1297
|
MenuItemBody,
|
|
1295
1298
|
{
|
|
1296
1299
|
label,
|
|
1297
1300
|
size,
|
|
1298
1301
|
description,
|
|
1302
|
+
aside,
|
|
1299
1303
|
leading,
|
|
1300
1304
|
trailing,
|
|
1301
1305
|
hint,
|
|
@@ -2272,6 +2276,7 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
2272
2276
|
size: "tall",
|
|
2273
2277
|
label: row.label,
|
|
2274
2278
|
description: row.description,
|
|
2279
|
+
aside: row.aside,
|
|
2275
2280
|
leading: /* @__PURE__ */ jsx32(RowLeading, { row }),
|
|
2276
2281
|
submenu: !!row.onGoIn,
|
|
2277
2282
|
hint: row.onGoIn ? /* @__PURE__ */ jsx32(Kbd, { children: "Tab" }) : /* @__PURE__ */ jsx32(EnterHint, {})
|
|
@@ -3821,7 +3826,7 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
3821
3826
|
const drawRow = (item) => {
|
|
3822
3827
|
const index = items.indexOf(item);
|
|
3823
3828
|
const selected = index === highlight;
|
|
3824
|
-
const { label, description, leading, shortcut, hint, size } = row(item);
|
|
3829
|
+
const { label, description, aside, leading, shortcut, hint, size } = row(item);
|
|
3825
3830
|
return (
|
|
3826
3831
|
// A row of a list the editor drives from its caret: focus stays in the text, so the row is no Tab stop.
|
|
3827
3832
|
/* @__PURE__ */ jsx54(
|
|
@@ -3835,6 +3840,7 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
3835
3840
|
size,
|
|
3836
3841
|
label,
|
|
3837
3842
|
description,
|
|
3843
|
+
aside,
|
|
3838
3844
|
leading,
|
|
3839
3845
|
shortcut,
|
|
3840
3846
|
hint,
|