@hanzo/ui 8.0.109 → 8.0.111
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/gui-config.cjs +29 -0
- package/dist/gui-config.d.ts +4 -4
- package/dist/gui-config.d.ts.map +1 -1
- package/dist/gui-config.js +29 -0
- package/dist/gui-config.js.map +1 -1
- package/dist/product/Palette.cjs +16 -7
- package/dist/product/Palette.d.ts +16 -5
- package/dist/product/Palette.d.ts.map +1 -1
- package/dist/product/Palette.js +17 -8
- package/dist/product/Palette.js.map +1 -1
- package/dist/product/match.cjs +44 -1
- package/dist/product/match.d.ts +33 -0
- package/dist/product/match.d.ts.map +1 -1
- package/dist/product/match.js +41 -0
- package/dist/product/match.js.map +1 -1
- package/package.json +3 -1
package/dist/gui-config.cjs
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.monochrome = exports.config = void 0;
|
|
4
4
|
exports.css = css;
|
|
5
5
|
const v5_1 = require("@hanzogui/config/v5");
|
|
6
|
+
const animations_css_1 = require("@hanzogui/animations-css");
|
|
6
7
|
const gui_1 = require("@hanzo/gui");
|
|
7
8
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
8
9
|
// THE ONE SCALE — shared, because a second app that copied it would fork it.
|
|
@@ -410,7 +411,35 @@ const asSizes = (t) => t;
|
|
|
410
411
|
* after the fact. A generated sheet edited afterwards is a fact stated twice, so
|
|
411
412
|
* it is stated here instead, once, where both read it.
|
|
412
413
|
*/
|
|
414
|
+
/**
|
|
415
|
+
* The animation driver. gui resolves every `animation` prop and every
|
|
416
|
+
* `useAnimatedNumber` through the config's driver, and `createGui` accepts its
|
|
417
|
+
* absence silently — until a Sheet mounts and hydration dies in
|
|
418
|
+
* `setValue` of undefined. The CSS driver costs no runtime: it renders
|
|
419
|
+
* transitions, which is all a monochrome product chrome animates. Named rungs
|
|
420
|
+
* ride design's motion tokens so a rebrand retunes them.
|
|
421
|
+
*/
|
|
422
|
+
const EASE = 'var(--ease-out, cubic-bezier(0.215, 0.61, 0.355, 1))';
|
|
423
|
+
const animations = (0, animations_css_1.createAnimations)({
|
|
424
|
+
// The driver's required fallback: what an unnamed `animation` resolves to.
|
|
425
|
+
default: `${EASE} var(--duration-base, 300ms)`,
|
|
426
|
+
'75ms': `${EASE} 75ms`,
|
|
427
|
+
'100ms': `${EASE} 100ms`,
|
|
428
|
+
'200ms': `${EASE} 200ms`,
|
|
429
|
+
quickest: `${EASE} var(--duration-fast, 150ms)`,
|
|
430
|
+
quicker: `${EASE} var(--duration-base, 300ms)`,
|
|
431
|
+
quick: `${EASE} var(--duration-slow, 400ms)`,
|
|
432
|
+
medium: `${EASE} 300ms`,
|
|
433
|
+
slow: `${EASE} 500ms`,
|
|
434
|
+
bouncy: `${EASE} 200ms`,
|
|
435
|
+
lazy: `${EASE} 1000ms`,
|
|
436
|
+
tooltip: `${EASE} 400ms`,
|
|
437
|
+
});
|
|
413
438
|
const base = {
|
|
439
|
+
// The cast crosses pnpm's instance boundary, not a design boundary: the
|
|
440
|
+
// driver package pins @hanzogui/web exactly while @hanzo/gui floats it, so
|
|
441
|
+
// the two AnimationDriver types are the same shape from two installs.
|
|
442
|
+
animations: animations,
|
|
414
443
|
...v5_1.defaultConfig,
|
|
415
444
|
settings: { ...v5_1.defaultConfig.settings, shouldAddPrefersColorThemes: false },
|
|
416
445
|
tokens: {
|
package/dist/gui-config.d.ts
CHANGED
|
@@ -183,7 +183,7 @@ export declare const config: import("@hanzogui/web").GuiInternalConfig<{
|
|
|
183
183
|
readonly 'height-lg': {
|
|
184
184
|
readonly minHeight: number;
|
|
185
185
|
};
|
|
186
|
-
},
|
|
186
|
+
}, any, {
|
|
187
187
|
body: {
|
|
188
188
|
family: string;
|
|
189
189
|
size: {
|
|
@@ -764,7 +764,7 @@ export declare const config: import("@hanzogui/web").GuiInternalConfig<{
|
|
|
764
764
|
addThemeClassName: "html";
|
|
765
765
|
onlyAllowShorthands: true;
|
|
766
766
|
styleCompat: "web";
|
|
767
|
-
},
|
|
767
|
+
}, string>;
|
|
768
768
|
export default config;
|
|
769
769
|
/**
|
|
770
770
|
* gui's stylesheet, with the declarations that shadow @hanzo/design removed.
|
|
@@ -1000,7 +1000,7 @@ export declare const monochrome: import("@hanzogui/web").GuiInternalConfig<{
|
|
|
1000
1000
|
readonly 'height-lg': {
|
|
1001
1001
|
readonly minHeight: number;
|
|
1002
1002
|
};
|
|
1003
|
-
},
|
|
1003
|
+
}, any, {
|
|
1004
1004
|
body: {
|
|
1005
1005
|
family: string;
|
|
1006
1006
|
size: {
|
|
@@ -1581,6 +1581,6 @@ export declare const monochrome: import("@hanzogui/web").GuiInternalConfig<{
|
|
|
1581
1581
|
addThemeClassName: "html";
|
|
1582
1582
|
onlyAllowShorthands: true;
|
|
1583
1583
|
styleCompat: "web";
|
|
1584
|
-
},
|
|
1584
|
+
}, string>;
|
|
1585
1585
|
export type Conf = typeof config;
|
|
1586
1586
|
//# sourceMappingURL=gui-config.d.ts.map
|
package/dist/gui-config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gui-config.d.ts","sourceRoot":"","sources":["../src/gui-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gui-config.d.ts","sourceRoot":"","sources":["../src/gui-config.ts"],"names":[],"mappings":"AAgeA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAKrB,CAAA;AAEF,MAAM,MAAM,IAAI,GAAG,OAAO,MAAM,CAAA"}
|
package/dist/gui-config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defaultConfig } from '@hanzogui/config/v5';
|
|
2
|
+
import { createAnimations } from '@hanzogui/animations-css';
|
|
2
3
|
import { createGui } from '@hanzo/gui';
|
|
3
4
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
4
5
|
// THE ONE SCALE — shared, because a second app that copied it would fork it.
|
|
@@ -406,7 +407,35 @@ const asSizes = (t) => t;
|
|
|
406
407
|
* after the fact. A generated sheet edited afterwards is a fact stated twice, so
|
|
407
408
|
* it is stated here instead, once, where both read it.
|
|
408
409
|
*/
|
|
410
|
+
/**
|
|
411
|
+
* The animation driver. gui resolves every `animation` prop and every
|
|
412
|
+
* `useAnimatedNumber` through the config's driver, and `createGui` accepts its
|
|
413
|
+
* absence silently — until a Sheet mounts and hydration dies in
|
|
414
|
+
* `setValue` of undefined. The CSS driver costs no runtime: it renders
|
|
415
|
+
* transitions, which is all a monochrome product chrome animates. Named rungs
|
|
416
|
+
* ride design's motion tokens so a rebrand retunes them.
|
|
417
|
+
*/
|
|
418
|
+
const EASE = 'var(--ease-out, cubic-bezier(0.215, 0.61, 0.355, 1))';
|
|
419
|
+
const animations = createAnimations({
|
|
420
|
+
// The driver's required fallback: what an unnamed `animation` resolves to.
|
|
421
|
+
default: `${EASE} var(--duration-base, 300ms)`,
|
|
422
|
+
'75ms': `${EASE} 75ms`,
|
|
423
|
+
'100ms': `${EASE} 100ms`,
|
|
424
|
+
'200ms': `${EASE} 200ms`,
|
|
425
|
+
quickest: `${EASE} var(--duration-fast, 150ms)`,
|
|
426
|
+
quicker: `${EASE} var(--duration-base, 300ms)`,
|
|
427
|
+
quick: `${EASE} var(--duration-slow, 400ms)`,
|
|
428
|
+
medium: `${EASE} 300ms`,
|
|
429
|
+
slow: `${EASE} 500ms`,
|
|
430
|
+
bouncy: `${EASE} 200ms`,
|
|
431
|
+
lazy: `${EASE} 1000ms`,
|
|
432
|
+
tooltip: `${EASE} 400ms`,
|
|
433
|
+
});
|
|
409
434
|
const base = {
|
|
435
|
+
// The cast crosses pnpm's instance boundary, not a design boundary: the
|
|
436
|
+
// driver package pins @hanzogui/web exactly while @hanzo/gui floats it, so
|
|
437
|
+
// the two AnimationDriver types are the same shape from two installs.
|
|
438
|
+
animations: animations,
|
|
410
439
|
...defaultConfig,
|
|
411
440
|
settings: { ...defaultConfig.settings, shouldAddPrefersColorThemes: false },
|
|
412
441
|
tokens: {
|
package/dist/gui-config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gui-config.js","sourceRoot":"","sources":["../src/gui-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"gui-config.js","sourceRoot":"","sources":["../src/gui-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EA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eG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC;IAClC,GAAG,IAAI;IACP,MAAM,EAAE,MAAM,CAAC,WAAW,CACxB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAC3C;CACnB,CAAC,CAAA"}
|
package/dist/product/Palette.cjs
CHANGED
|
@@ -31,24 +31,33 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
31
31
|
* its personality: hanzo.app keeps its live project preview and console keeps its
|
|
32
32
|
* `>` AI mode by passing them, not by forking this.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
35
|
-
* the empty-query behaviour all live in `match.ts` as pure
|
|
36
|
-
* `shouldFilter` is off and the Command primitive is left holding
|
|
37
|
-
* the view — which is also what makes
|
|
34
|
+
* Which rows exist is `rows`. The safe-methods-browse rule, the per-group cap,
|
|
35
|
+
* the empty-query behaviour and the ask row all live in `match.ts` as pure
|
|
36
|
+
* functions, so `shouldFilter` is off and the Command primitive is left holding
|
|
37
|
+
* the cursor and the view — which is also what makes them testable without a
|
|
38
|
+
* DOM. This component renders into a portal, so a test cannot read its rows at
|
|
39
|
+
* all; a rule kept here instead would be a rule nothing can check.
|
|
38
40
|
*/
|
|
39
41
|
const react_1 = require("react");
|
|
40
42
|
const gui_1 = require("@hanzo/gui");
|
|
41
43
|
const gui_2 = require("../backends/gui/index.cjs");
|
|
42
44
|
const match_1 = require("./match.cjs");
|
|
43
|
-
function Palette({ open, onOpenChange, ops, onRun, active, onActive, search: controlled, onSearch, placeholder = "Search commands…", empty = "No results found.", limit, children, footer, height = 320, title = "Search commands", }) {
|
|
45
|
+
function Palette({ open, onOpenChange, ops, onRun, active, onActive, search: controlled, onSearch, placeholder = "Search commands…", empty = "No results found.", limit, children, footer, height = 320, title = "Search commands", onAsk, }) {
|
|
44
46
|
const [own, setOwn] = (0, react_1.useState)("");
|
|
45
47
|
const search = controlled ?? own;
|
|
46
48
|
const setSearch = (s) => {
|
|
47
49
|
setOwn(s);
|
|
48
50
|
onSearch?.(s);
|
|
49
51
|
};
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
+
const question = search.trim();
|
|
53
|
+
const groups = (0, react_1.useMemo)(() => (0, match_1.rows)(ops, search, limit, !!onAsk), [ops, search, limit, onAsk]);
|
|
54
|
+
const run = (op) => {
|
|
55
|
+
if (op.id === match_1.ASK && onAsk)
|
|
56
|
+
onAsk(question);
|
|
57
|
+
else
|
|
58
|
+
onRun(op);
|
|
59
|
+
};
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(gui_2.CommandDialog, { open: open, onOpenChange: onOpenChange, title: title, description: placeholder, value: active, onValueChange: onActive, shouldFilter: false, children: [(0, jsx_runtime_1.jsx)(gui_2.CommandInput, { value: search, onValueChange: setSearch, placeholder: placeholder, color: "$color", placeholderTextColor: "$color11" }), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { minH: height, children: [(0, jsx_runtime_1.jsxs)(gui_2.CommandList, { maxH: height, width: children ? "50%" : "100%", borderRightWidth: children ? 1 : 0, borderColor: "$borderColor", pt: "$1", pb: "$4", children: [groups.length === 0 && ((0, jsx_runtime_1.jsx)(gui_2.CommandEmpty, { children: (0, jsx_runtime_1.jsx)(gui_1.SizableText, { color: "$color11", children: empty }) })), groups.map(([group, items]) => ((0, jsx_runtime_1.jsx)(gui_2.CommandGroup, { heading: group, children: items.map((op) => ((0, jsx_runtime_1.jsxs)(gui_2.CommandItem, { value: op.id, onSelect: () => run(op), gap: "$2", children: [op.icon, (0, jsx_runtime_1.jsxs)(gui_1.XStack, { flex: 1, items: "center", gap: "$2", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(gui_1.SizableText, { numberOfLines: 1, shrink: 0, children: op.label }), op.hint ? ((0, jsx_runtime_1.jsx)(gui_1.SizableText, { numberOfLines: 1, flex: 1, fontSize: "$1", color: "$color11", children: op.hint })) : null] }), (0, jsx_runtime_1.jsx)(Method, { of: op }), op.end] }, op.id))) }, group)))] }), children ? (0, jsx_runtime_1.jsx)(gui_1.YStack, { width: "50%", children: children }) : null] }), footer ? ((0, jsx_runtime_1.jsx)(gui_1.XStack, { items: "center", gap: "$4", borderTopWidth: 1, borderColor: "$borderColor", px: "$3", py: "$2", children: footer })) : null] }));
|
|
52
61
|
}
|
|
53
62
|
/**
|
|
54
63
|
* The method, at the end of the row, for route commands only.
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
* its personality: hanzo.app keeps its live project preview and console keeps its
|
|
27
27
|
* `>` AI mode by passing them, not by forking this.
|
|
28
28
|
*
|
|
29
|
-
*
|
|
30
|
-
* the empty-query behaviour all live in `match.ts` as pure
|
|
31
|
-
* `shouldFilter` is off and the Command primitive is left holding
|
|
32
|
-
* the view — which is also what makes
|
|
29
|
+
* Which rows exist is `rows`. The safe-methods-browse rule, the per-group cap,
|
|
30
|
+
* the empty-query behaviour and the ask row all live in `match.ts` as pure
|
|
31
|
+
* functions, so `shouldFilter` is off and the Command primitive is left holding
|
|
32
|
+
* the cursor and the view — which is also what makes them testable without a
|
|
33
|
+
* DOM. This component renders into a portal, so a test cannot read its rows at
|
|
34
|
+
* all; a rule kept here instead would be a rule nothing can check.
|
|
33
35
|
*/
|
|
34
36
|
import { type ReactNode } from "react";
|
|
35
37
|
import { type Op } from "./match.js";
|
|
@@ -62,6 +64,15 @@ export type PaletteProps = {
|
|
|
62
64
|
height?: number;
|
|
63
65
|
/** The dialog's accessible name. */
|
|
64
66
|
title?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Take whatever was typed and answer it, when the list cannot.
|
|
69
|
+
*
|
|
70
|
+
* Supplied, the bar ends with one "Ask AI: …" row for any non-empty query, so
|
|
71
|
+
* a search that matches nothing is a question rather than a dead end. Absent,
|
|
72
|
+
* the bar behaves exactly as it did — a surface with nothing to ask does not
|
|
73
|
+
* grow a row that goes nowhere.
|
|
74
|
+
*/
|
|
75
|
+
onAsk?: (question: string) => void;
|
|
65
76
|
};
|
|
66
|
-
export declare function Palette({ open, onOpenChange, ops, onRun, active, onActive, search: controlled, onSearch, placeholder, empty, limit, children, footer, height, title, }: PaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
export declare function Palette({ open, onOpenChange, ops, onRun, active, onActive, search: controlled, onSearch, placeholder, empty, limit, children, footer, height, title, onAsk, }: PaletteProps): import("react/jsx-runtime").JSX.Element;
|
|
67
78
|
//# sourceMappingURL=Palette.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Palette.d.ts","sourceRoot":"","sources":["../../src/product/Palette.tsx"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"Palette.d.ts","sourceRoot":"","sources":["../../src/product/Palette.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAA;AAWzD,OAAO,EAAmB,KAAK,EAAE,EAAE,MAAM,SAAS,CAAA;AAElD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,oEAAoE;IACpE,GAAG,EAAE,EAAE,EAAE,CAAA;IACT,0DAA0D;IAC1D,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,IAAI,CAAA;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mEAAmE;IACnE,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qDAAqD;IACrD,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CACnC,CAAA;AAED,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EAAE,UAAU,EAClB,QAAQ,EACR,WAAgC,EAChC,KAA2B,EAC3B,KAAK,EACL,QAAQ,EACR,MAAM,EACN,MAAY,EACZ,KAAyB,EACzB,KAAK,GACN,EAAE,YAAY,2CA8Gd"}
|
package/dist/product/Palette.js
CHANGED
|
@@ -28,24 +28,33 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
28
28
|
* its personality: hanzo.app keeps its live project preview and console keeps its
|
|
29
29
|
* `>` AI mode by passing them, not by forking this.
|
|
30
30
|
*
|
|
31
|
-
*
|
|
32
|
-
* the empty-query behaviour all live in `match.ts` as pure
|
|
33
|
-
* `shouldFilter` is off and the Command primitive is left holding
|
|
34
|
-
* the view — which is also what makes
|
|
31
|
+
* Which rows exist is `rows`. The safe-methods-browse rule, the per-group cap,
|
|
32
|
+
* the empty-query behaviour and the ask row all live in `match.ts` as pure
|
|
33
|
+
* functions, so `shouldFilter` is off and the Command primitive is left holding
|
|
34
|
+
* the cursor and the view — which is also what makes them testable without a
|
|
35
|
+
* DOM. This component renders into a portal, so a test cannot read its rows at
|
|
36
|
+
* all; a rule kept here instead would be a rule nothing can check.
|
|
35
37
|
*/
|
|
36
38
|
import { useMemo, useState } from "react";
|
|
37
39
|
import { SizableText, XStack, YStack } from "@hanzo/gui";
|
|
38
40
|
import { CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "../backends/gui/index.js";
|
|
39
|
-
import { SAFE,
|
|
40
|
-
export function Palette({ open, onOpenChange, ops, onRun, active, onActive, search: controlled, onSearch, placeholder = "Search commands…", empty = "No results found.", limit, children, footer, height = 320, title = "Search commands", }) {
|
|
41
|
+
import { ASK, SAFE, rows } from "./match.js";
|
|
42
|
+
export function Palette({ open, onOpenChange, ops, onRun, active, onActive, search: controlled, onSearch, placeholder = "Search commands…", empty = "No results found.", limit, children, footer, height = 320, title = "Search commands", onAsk, }) {
|
|
41
43
|
const [own, setOwn] = useState("");
|
|
42
44
|
const search = controlled ?? own;
|
|
43
45
|
const setSearch = (s) => {
|
|
44
46
|
setOwn(s);
|
|
45
47
|
onSearch?.(s);
|
|
46
48
|
};
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
+
const question = search.trim();
|
|
50
|
+
const groups = useMemo(() => rows(ops, search, limit, !!onAsk), [ops, search, limit, onAsk]);
|
|
51
|
+
const run = (op) => {
|
|
52
|
+
if (op.id === ASK && onAsk)
|
|
53
|
+
onAsk(question);
|
|
54
|
+
else
|
|
55
|
+
onRun(op);
|
|
56
|
+
};
|
|
57
|
+
return (_jsxs(CommandDialog, { open: open, onOpenChange: onOpenChange, title: title, description: placeholder, value: active, onValueChange: onActive, shouldFilter: false, children: [_jsx(CommandInput, { value: search, onValueChange: setSearch, placeholder: placeholder, color: "$color", placeholderTextColor: "$color11" }), _jsxs(XStack, { minH: height, children: [_jsxs(CommandList, { maxH: height, width: children ? "50%" : "100%", borderRightWidth: children ? 1 : 0, borderColor: "$borderColor", pt: "$1", pb: "$4", children: [groups.length === 0 && (_jsx(CommandEmpty, { children: _jsx(SizableText, { color: "$color11", children: empty }) })), groups.map(([group, items]) => (_jsx(CommandGroup, { heading: group, children: items.map((op) => (_jsxs(CommandItem, { value: op.id, onSelect: () => run(op), gap: "$2", children: [op.icon, _jsxs(XStack, { flex: 1, items: "center", gap: "$2", overflow: "hidden", children: [_jsx(SizableText, { numberOfLines: 1, shrink: 0, children: op.label }), op.hint ? (_jsx(SizableText, { numberOfLines: 1, flex: 1, fontSize: "$1", color: "$color11", children: op.hint })) : null] }), _jsx(Method, { of: op }), op.end] }, op.id))) }, group)))] }), children ? _jsx(YStack, { width: "50%", children: children }) : null] }), footer ? (_jsx(XStack, { items: "center", gap: "$4", borderTopWidth: 1, borderColor: "$borderColor", px: "$3", py: "$2", children: footer })) : null] }));
|
|
49
58
|
}
|
|
50
59
|
/**
|
|
51
60
|
* The method, at the end of the row, for route commands only.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Palette.js","sourceRoot":"","sources":["../../src/product/Palette.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ
|
|
1
|
+
{"version":3,"file":"Palette.js","sourceRoot":"","sources":["../../src/product/Palette.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAkB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,GACZ,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAW,MAAM,SAAS,CAAA;AA0ClD,MAAM,UAAU,OAAO,CAAC,EACtB,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EAAE,UAAU,EAClB,QAAQ,EACR,WAAW,GAAG,kBAAkB,EAChC,KAAK,GAAG,mBAAmB,EAC3B,KAAK,EACL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AqBT,CACf,CAAC,IAxBe,KAAK,CAyBT,CAChB,CAAC,IACU,EACb,QAAQ,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,KAAK,EAAC,KAAK,YAAE,QAAQ,GAAU,CAAC,CAAC,CAAC,IAAI,IACnD,EACR,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,MAAM,IACL,KAAK,EAAC,QAAQ,EACd,GAAG,EAAC,IAAI,EACR,cAAc,EAAE,CAAC,EACjB,WAAW,EAAC,cAAc,EAC1B,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,YAEN,MAAM,GACA,CACV,CAAC,CAAC,CAAC,IAAI,IACM,CACjB,CAAA;AACH,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,MAAM,CAAC,EAAE,EAAE,EAAc;IAChC,IAAI,EAAE,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,IAAI,CAAA;IACxC,OAAO,CACL,KAAC,WAAW,IACV,MAAM,EAAE,CAAC,EACT,UAAU,EAAC,OAAO,EAClB,QAAQ,EAAE,EAAE,EACZ,aAAa,EAAE,GAAG,EAClB,KAAK,EAAE,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,YAEhD,EAAE,CAAC,MAAM,GACE,CACf,CAAA;AACH,CAAC"}
|
package/dist/product/match.cjs
CHANGED
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
'use client';"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.survivors = exports.match = exports.SAFE = void 0;
|
|
3
|
+
exports.rows = exports.survivors = exports.match = exports.askOp = exports.ASK_GROUP = exports.ASK = exports.SAFE = void 0;
|
|
4
4
|
const command_logic_1 = require("../backends/gui/command.logic.cjs");
|
|
5
5
|
/** The one method that is safe to stumble onto: no side effect, idempotent. */
|
|
6
6
|
exports.SAFE = 'GET';
|
|
7
|
+
/**
|
|
8
|
+
* The row that makes a question the answer when nothing else is.
|
|
9
|
+
*
|
|
10
|
+
* A command list is finite and a question is not, so "no results" is never the
|
|
11
|
+
* right end of a palette — the AI is the one thing that can take a query nobody
|
|
12
|
+
* indexed. Every Hanzo palette ends this way, and it must LOOK the same in all
|
|
13
|
+
* of them, so the label is built here rather than typed out per surface.
|
|
14
|
+
*
|
|
15
|
+
* It is a plain `Op`, which is why it needs nothing else: it files under its own
|
|
16
|
+
* group, carries no method (it runs in the page, not against a route), and
|
|
17
|
+
* reaches the host through the same `onRun` every other row uses.
|
|
18
|
+
*
|
|
19
|
+
* `@hanzogui/shell` states this same rule for the palettes it draws. The two
|
|
20
|
+
* cannot import from each other — shell is deliberately dependency-free so it
|
|
21
|
+
* drops into a Vite app with no provider, which is the whole reason it exists —
|
|
22
|
+
* so the string is asserted equal by test rather than shared by import.
|
|
23
|
+
*/
|
|
24
|
+
exports.ASK = 'ask';
|
|
25
|
+
exports.ASK_GROUP = 'Ask';
|
|
26
|
+
const askOp = (question) => ({
|
|
27
|
+
id: exports.ASK,
|
|
28
|
+
group: exports.ASK_GROUP,
|
|
29
|
+
label: `Ask AI: ${question}`,
|
|
30
|
+
});
|
|
31
|
+
exports.askOp = askOp;
|
|
7
32
|
/**
|
|
8
33
|
* Whether `op` survives `search`, and how well. `0` hides it.
|
|
9
34
|
*
|
|
@@ -74,3 +99,21 @@ const survivors = (ops, search, limit = 50) => {
|
|
|
74
99
|
return out;
|
|
75
100
|
};
|
|
76
101
|
exports.survivors = survivors;
|
|
102
|
+
/**
|
|
103
|
+
* What the bar actually shows: what survived the search, then the way out.
|
|
104
|
+
*
|
|
105
|
+
* The ask row is APPENDED rather than filtered. It answers the query by
|
|
106
|
+
* definition — its own label contains it — so putting it through `survivors`
|
|
107
|
+
* would score a row against itself, and the one row that must be present
|
|
108
|
+
* exactly when nothing else is would be at the mercy of the ranker.
|
|
109
|
+
*
|
|
110
|
+
* It lives here rather than in the component for the same reason every other
|
|
111
|
+
* rule about which rows exist does: `Palette` renders into a portal, so no test
|
|
112
|
+
* can read its rows, and a rule that cannot be tested is a rule that drifts.
|
|
113
|
+
*/
|
|
114
|
+
const rows = (ops, search, limit, canAsk = false) => {
|
|
115
|
+
const found = (0, exports.survivors)(ops, search, limit);
|
|
116
|
+
const question = search.trim();
|
|
117
|
+
return canAsk && question ? [...found, [exports.ASK_GROUP, [(0, exports.askOp)(question)]]] : found;
|
|
118
|
+
};
|
|
119
|
+
exports.rows = rows;
|
package/dist/product/match.d.ts
CHANGED
|
@@ -36,6 +36,26 @@ export interface Op {
|
|
|
36
36
|
}
|
|
37
37
|
/** The one method that is safe to stumble onto: no side effect, idempotent. */
|
|
38
38
|
export declare const SAFE = "GET";
|
|
39
|
+
/**
|
|
40
|
+
* The row that makes a question the answer when nothing else is.
|
|
41
|
+
*
|
|
42
|
+
* A command list is finite and a question is not, so "no results" is never the
|
|
43
|
+
* right end of a palette — the AI is the one thing that can take a query nobody
|
|
44
|
+
* indexed. Every Hanzo palette ends this way, and it must LOOK the same in all
|
|
45
|
+
* of them, so the label is built here rather than typed out per surface.
|
|
46
|
+
*
|
|
47
|
+
* It is a plain `Op`, which is why it needs nothing else: it files under its own
|
|
48
|
+
* group, carries no method (it runs in the page, not against a route), and
|
|
49
|
+
* reaches the host through the same `onRun` every other row uses.
|
|
50
|
+
*
|
|
51
|
+
* `@hanzogui/shell` states this same rule for the palettes it draws. The two
|
|
52
|
+
* cannot import from each other — shell is deliberately dependency-free so it
|
|
53
|
+
* drops into a Vite app with no provider, which is the whole reason it exists —
|
|
54
|
+
* so the string is asserted equal by test rather than shared by import.
|
|
55
|
+
*/
|
|
56
|
+
export declare const ASK = "ask";
|
|
57
|
+
export declare const ASK_GROUP = "Ask";
|
|
58
|
+
export declare const askOp: (question: string) => Op;
|
|
39
59
|
/**
|
|
40
60
|
* Whether `op` survives `search`, and how well. `0` hides it.
|
|
41
61
|
*
|
|
@@ -75,4 +95,17 @@ export declare const match: (op: Op, search: string) => number;
|
|
|
75
95
|
* be — the cap is what keeps one keystroke's cost bounded whatever was typed.
|
|
76
96
|
*/
|
|
77
97
|
export declare const survivors: (ops: Op[], search: string, limit?: number) => Array<[string, Op[]]>;
|
|
98
|
+
/**
|
|
99
|
+
* What the bar actually shows: what survived the search, then the way out.
|
|
100
|
+
*
|
|
101
|
+
* The ask row is APPENDED rather than filtered. It answers the query by
|
|
102
|
+
* definition — its own label contains it — so putting it through `survivors`
|
|
103
|
+
* would score a row against itself, and the one row that must be present
|
|
104
|
+
* exactly when nothing else is would be at the mercy of the ranker.
|
|
105
|
+
*
|
|
106
|
+
* It lives here rather than in the component for the same reason every other
|
|
107
|
+
* rule about which rows exist does: `Palette` renders into a portal, so no test
|
|
108
|
+
* can read its rows, and a rule that cannot be tested is a rule that drifts.
|
|
109
|
+
*/
|
|
110
|
+
export declare const rows: (ops: Op[], search: string, limit?: number, canAsk?: boolean) => Array<[string, Op[]]>;
|
|
78
111
|
//# sourceMappingURL=match.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../src/product/match.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC;;;;;;;GAOG;AACH,MAAM,WAAW,EAAE;IACjB,4EAA4E;IAC5E,EAAE,EAAE,MAAM,CAAA;IACV,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAA;IACb,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qCAAqC;IACrC,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,8DAA8D;IAC9D,GAAG,CAAC,EAAE,SAAS,CAAA;CAChB;AAED,+EAA+E;AAC/E,eAAO,MAAM,IAAI,QAAQ,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;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U,KAAG,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,CAiBrF,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,GACf,KAAK,EAAE,EAAE,EACT,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,gBAAc,KACb,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,CAItB,CAAA"}
|
package/dist/product/match.js
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
'use client';import { score } from '../backends/gui/command.logic.js';
|
|
2
2
|
/** The one method that is safe to stumble onto: no side effect, idempotent. */
|
|
3
3
|
export const SAFE = 'GET';
|
|
4
|
+
/**
|
|
5
|
+
* The row that makes a question the answer when nothing else is.
|
|
6
|
+
*
|
|
7
|
+
* A command list is finite and a question is not, so "no results" is never the
|
|
8
|
+
* right end of a palette — the AI is the one thing that can take a query nobody
|
|
9
|
+
* indexed. Every Hanzo palette ends this way, and it must LOOK the same in all
|
|
10
|
+
* of them, so the label is built here rather than typed out per surface.
|
|
11
|
+
*
|
|
12
|
+
* It is a plain `Op`, which is why it needs nothing else: it files under its own
|
|
13
|
+
* group, carries no method (it runs in the page, not against a route), and
|
|
14
|
+
* reaches the host through the same `onRun` every other row uses.
|
|
15
|
+
*
|
|
16
|
+
* `@hanzogui/shell` states this same rule for the palettes it draws. The two
|
|
17
|
+
* cannot import from each other — shell is deliberately dependency-free so it
|
|
18
|
+
* drops into a Vite app with no provider, which is the whole reason it exists —
|
|
19
|
+
* so the string is asserted equal by test rather than shared by import.
|
|
20
|
+
*/
|
|
21
|
+
export const ASK = 'ask';
|
|
22
|
+
export const ASK_GROUP = 'Ask';
|
|
23
|
+
export const askOp = (question) => ({
|
|
24
|
+
id: ASK,
|
|
25
|
+
group: ASK_GROUP,
|
|
26
|
+
label: `Ask AI: ${question}`,
|
|
27
|
+
});
|
|
4
28
|
/**
|
|
5
29
|
* Whether `op` survives `search`, and how well. `0` hides it.
|
|
6
30
|
*
|
|
@@ -69,4 +93,21 @@ export const survivors = (ops, search, limit = 50) => {
|
|
|
69
93
|
}
|
|
70
94
|
return out;
|
|
71
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* What the bar actually shows: what survived the search, then the way out.
|
|
98
|
+
*
|
|
99
|
+
* The ask row is APPENDED rather than filtered. It answers the query by
|
|
100
|
+
* definition — its own label contains it — so putting it through `survivors`
|
|
101
|
+
* would score a row against itself, and the one row that must be present
|
|
102
|
+
* exactly when nothing else is would be at the mercy of the ranker.
|
|
103
|
+
*
|
|
104
|
+
* It lives here rather than in the component for the same reason every other
|
|
105
|
+
* rule about which rows exist does: `Palette` renders into a portal, so no test
|
|
106
|
+
* can read its rows, and a rule that cannot be tested is a rule that drifts.
|
|
107
|
+
*/
|
|
108
|
+
export const rows = (ops, search, limit, canAsk = false) => {
|
|
109
|
+
const found = survivors(ops, search, limit);
|
|
110
|
+
const question = search.trim();
|
|
111
|
+
return canAsk && question ? [...found, [ASK_GROUP, [askOp(question)]]] : found;
|
|
112
|
+
};
|
|
72
113
|
//# sourceMappingURL=match.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match.js","sourceRoot":"","sources":["../../src/product/match.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AA2BrD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAM,EAAE,MAAc,EAAU,EAAE;IACtD,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IACrC,MAAM,KAAK,GAAG,EAAE,CAAC,MAAM,KAAK,SAAS,CAAA;IACrC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,C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AC,CAAC,CAAC,CAAC,CAAA;QAClC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IAC7D,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,GAAS,EACT,MAAc,EACd,KAAc,EACd,MAAM,GAAG,KAAK,EACS,EAAE;IACzB,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;IAC3C,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,EAAE,CAAA;IAC9B,OAAO,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;AAChF,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.111",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
|
|
6
6
|
"exports": {
|
|
@@ -207,6 +207,7 @@
|
|
|
207
207
|
"@hanzo/data": ">=1.2.3",
|
|
208
208
|
"@hanzo/gui": ">=8.1.0",
|
|
209
209
|
"@hanzo/usage": ">=0.1.0",
|
|
210
|
+
"@hanzogui/animations-css": ">=8.1.0",
|
|
210
211
|
"@hanzogui/config": ">=8.1.0",
|
|
211
212
|
"@hanzogui/lucide-icons-2": ">=8.1.0",
|
|
212
213
|
"@hanzogui/next-theme": ">=8.1.0",
|
|
@@ -249,6 +250,7 @@
|
|
|
249
250
|
"@hanzo/data": "1.2.3",
|
|
250
251
|
"@hanzo/gui": "8.1.0",
|
|
251
252
|
"@hanzo/usage": "^0.1.6",
|
|
253
|
+
"@hanzogui/animations-css": "^8.1.1",
|
|
252
254
|
"@hanzogui/config": "8.1.0",
|
|
253
255
|
"@hanzogui/core": "8.1.0",
|
|
254
256
|
"@hanzogui/lucide-icons-2": "8.1.0",
|