@reforma/components 0.1.6 → 0.2.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/Scrollable/Scrollable.d.ts +1 -2
- package/dist/Scrollable/Scrollable.d.ts.map +1 -1
- package/dist/Scrollable/Scrollable.js +45 -38
- package/dist/Scrollable/Scrollable.js.map +1 -1
- package/dist/Scrollable/useScrollChrome.d.ts +1 -2
- package/dist/Scrollable/useScrollChrome.d.ts.map +1 -1
- package/dist/Scrollable/useScrollChrome.js +125 -110
- package/dist/Scrollable/useScrollChrome.js.map +1 -1
- package/dist/chat/ComposerBanner/ComposerBanner.d.ts +2 -1
- package/dist/chat/ComposerBanner/ComposerBanner.d.ts.map +1 -1
- package/dist/chat/ComposerBanner/ComposerBanner.js +37 -29
- package/dist/chat/ComposerBanner/ComposerBanner.js.map +1 -1
- package/dist/chat/ComposerBanner/ComposerBanner.module.css +1 -1
- package/dist/chat/ComposerBanner/ComposerBanner.module.css.js +5 -3
- package/dist/chat/ComposerBanner/ComposerBanner.module.css.js.map +1 -1
- package/dist/chat/Tool/agent/AgentTool.d.ts.map +1 -1
- package/dist/chat/Tool/agent/AgentTool.js +89 -90
- package/dist/chat/Tool/agent/AgentTool.js.map +1 -1
- package/dist/chat/Tool/edit/EditTool.js +1 -1
- package/dist/chat/Tool/edit/EditTool.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/errors.js +38 -0
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.js +21 -0
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +822 -0
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/api.js +561 -0
- package/dist/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.js +262 -0
- package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
- package/dist/node_modules/zod/v4/core/core.js +97 -0
- package/dist/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.js +35 -0
- package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.js +79 -0
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +308 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/memoizer.js +203 -0
- package/dist/node_modules/zod/v4/core/memoizer.js.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.js +113 -0
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.js +59 -0
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.js +41 -0
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.js +1104 -0
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +380 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
- package/dist/node_modules/zod/v4/core/util.js +465 -0
- package/dist/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/node_modules/zod/v4/locales/en.js +97 -0
- package/dist/node_modules/zod/v4/locales/en.js.map +1 -0
- package/dist/openui/actions.d.ts +16 -0
- package/dist/openui/actions.d.ts.map +1 -0
- package/dist/openui/actions.js +58 -0
- package/dist/openui/actions.js.map +1 -0
- package/dist/openui/components/controls.d.ts +34 -0
- package/dist/openui/components/controls.d.ts.map +1 -0
- package/dist/openui/components/controls.js +40 -0
- package/dist/openui/components/controls.js.map +1 -0
- package/dist/openui/components/layout.d.ts +74 -0
- package/dist/openui/components/layout.d.ts.map +1 -0
- package/dist/openui/components/layout.js +154 -0
- package/dist/openui/components/layout.js.map +1 -0
- package/dist/openui/components/list.d.ts +17 -0
- package/dist/openui/components/list.d.ts.map +1 -0
- package/dist/openui/components/list.js +96 -0
- package/dist/openui/components/list.js.map +1 -0
- package/dist/openui/components/svg.d.ts +100 -0
- package/dist/openui/components/svg.d.ts.map +1 -0
- package/dist/openui/components/svg.js +246 -0
- package/dist/openui/components/svg.js.map +1 -0
- package/dist/openui/components/table.d.ts +6 -0
- package/dist/openui/components/table.d.ts.map +1 -0
- package/dist/openui/components/table.js +54 -0
- package/dist/openui/components/table.js.map +1 -0
- package/dist/openui/components/text.d.ts +89 -0
- package/dist/openui/components/text.d.ts.map +1 -0
- package/dist/openui/components/text.js +181 -0
- package/dist/openui/components/text.js.map +1 -0
- package/dist/openui/functions/colors.d.ts +12 -0
- package/dist/openui/functions/colors.d.ts.map +1 -0
- package/dist/openui/functions/colors.js +32 -0
- package/dist/openui/functions/colors.js.map +1 -0
- package/dist/openui/functions/data.d.ts +170 -0
- package/dist/openui/functions/data.d.ts.map +1 -0
- package/dist/openui/functions/data.js +308 -0
- package/dist/openui/functions/data.js.map +1 -0
- package/dist/openui/functions/dates.d.ts +57 -0
- package/dist/openui/functions/dates.d.ts.map +1 -0
- package/dist/openui/functions/dates.js +184 -0
- package/dist/openui/functions/dates.js.map +1 -0
- package/dist/openui/functions/index.d.ts +136 -0
- package/dist/openui/functions/index.d.ts.map +1 -0
- package/dist/openui/functions/index.js +11 -0
- package/dist/openui/functions/index.js.map +1 -0
- package/dist/openui/functions/lists.d.ts +102 -0
- package/dist/openui/functions/lists.d.ts.map +1 -0
- package/dist/openui/functions/lists.js +305 -0
- package/dist/openui/functions/lists.js.map +1 -0
- package/dist/openui/functions/numbers.d.ts +72 -0
- package/dist/openui/functions/numbers.d.ts.map +1 -0
- package/dist/openui/functions/numbers.js +201 -0
- package/dist/openui/functions/numbers.js.map +1 -0
- package/dist/openui/functions/shared.d.ts +28 -0
- package/dist/openui/functions/shared.d.ts.map +1 -0
- package/dist/openui/functions/shared.js +69 -0
- package/dist/openui/functions/shared.js.map +1 -0
- package/dist/openui/functions/text.d.ts +97 -0
- package/dist/openui/functions/text.d.ts.map +1 -0
- package/dist/openui/functions/text.js +223 -0
- package/dist/openui/functions/text.js.map +1 -0
- package/dist/openui/index.d.ts +5 -0
- package/dist/openui/index.d.ts.map +1 -0
- package/dist/openui/index.js +14 -0
- package/dist/openui/index.js.map +1 -0
- package/dist/openui/library.d.ts +8 -0
- package/dist/openui/library.d.ts.map +1 -0
- package/dist/openui/library.js +37 -0
- package/dist/openui/library.js.map +1 -0
- package/dist/openui/schema.d.ts +36 -0
- package/dist/openui/schema.d.ts.map +1 -0
- package/dist/openui/schema.js +24 -0
- package/dist/openui/schema.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { joinValues as a, stringifyPrimitive as u, parsedType as v } from "../core/util.js";
|
|
2
|
+
const m = () => {
|
|
3
|
+
const o = {
|
|
4
|
+
string: { unit: "characters", verb: "to have" },
|
|
5
|
+
file: { unit: "bytes", verb: "to have" },
|
|
6
|
+
array: { unit: "items", verb: "to have" },
|
|
7
|
+
set: { unit: "items", verb: "to have" },
|
|
8
|
+
map: { unit: "entries", verb: "to have" }
|
|
9
|
+
};
|
|
10
|
+
function i(e) {
|
|
11
|
+
return o[e] ?? null;
|
|
12
|
+
}
|
|
13
|
+
const d = {
|
|
14
|
+
regex: "input",
|
|
15
|
+
email: "email address",
|
|
16
|
+
url: "URL",
|
|
17
|
+
emoji: "emoji",
|
|
18
|
+
uuid: "UUID",
|
|
19
|
+
uuidv4: "UUIDv4",
|
|
20
|
+
uuidv6: "UUIDv6",
|
|
21
|
+
nanoid: "nanoid",
|
|
22
|
+
guid: "GUID",
|
|
23
|
+
cuid: "cuid",
|
|
24
|
+
cuid2: "cuid2",
|
|
25
|
+
ulid: "ULID",
|
|
26
|
+
xid: "XID",
|
|
27
|
+
ksuid: "KSUID",
|
|
28
|
+
datetime: "ISO datetime",
|
|
29
|
+
date: "ISO date",
|
|
30
|
+
time: "ISO time",
|
|
31
|
+
duration: "ISO duration",
|
|
32
|
+
ipv4: "IPv4 address",
|
|
33
|
+
ipv6: "IPv6 address",
|
|
34
|
+
mac: "MAC address",
|
|
35
|
+
cidrv4: "IPv4 range",
|
|
36
|
+
cidrv6: "IPv6 range",
|
|
37
|
+
base64: "base64-encoded string",
|
|
38
|
+
base64url: "base64url-encoded string",
|
|
39
|
+
json_string: "JSON string",
|
|
40
|
+
e164: "E.164 number",
|
|
41
|
+
currency_code: "currency code",
|
|
42
|
+
credit_card: "credit card number",
|
|
43
|
+
iban: "IBAN",
|
|
44
|
+
jwt: "JWT",
|
|
45
|
+
template_literal: "input"
|
|
46
|
+
}, c = {
|
|
47
|
+
// Compatibility: "nan" -> "NaN" for display
|
|
48
|
+
nan: "NaN"
|
|
49
|
+
// All other type names omitted - they fall back to raw values via ?? operator
|
|
50
|
+
};
|
|
51
|
+
function r(e, t) {
|
|
52
|
+
return e === "number" && typeof t == "number" && !Number.isFinite(t) ? String(t) : c[e] ?? e;
|
|
53
|
+
}
|
|
54
|
+
return (e) => {
|
|
55
|
+
switch (e.code) {
|
|
56
|
+
case "invalid_type": {
|
|
57
|
+
const t = r(e.expected), n = v(e.input), l = r(n, e.input);
|
|
58
|
+
return `Invalid input: expected ${t}, received ${l}`;
|
|
59
|
+
}
|
|
60
|
+
case "invalid_value":
|
|
61
|
+
return e.values.length === 1 ? `Invalid input: expected ${u(e.values[0])}` : `Invalid option: expected one of ${a(e.values, "|")}`;
|
|
62
|
+
case "too_big": {
|
|
63
|
+
const t = e.exact ? "exactly " : e.inclusive ? "<=" : "<", n = i(e.origin);
|
|
64
|
+
return n ? `Too big: expected ${e.origin ?? "value"} to have ${t}${e.maximum.toString()} ${n.unit ?? "elements"}` : `Too big: expected ${e.origin ?? "value"} to be ${t}${e.maximum.toString()}`;
|
|
65
|
+
}
|
|
66
|
+
case "too_small": {
|
|
67
|
+
const t = e.exact ? "exactly " : e.inclusive ? ">=" : ">", n = i(e.origin);
|
|
68
|
+
return n ? `Too small: expected ${e.origin} to have ${t}${e.minimum.toString()} ${n.unit}` : `Too small: expected ${e.origin} to be ${t}${e.minimum.toString()}`;
|
|
69
|
+
}
|
|
70
|
+
case "invalid_format": {
|
|
71
|
+
const t = e;
|
|
72
|
+
return t.format === "starts_with" ? `Invalid string: must start with "${t.prefix}"` : t.format === "ends_with" ? `Invalid string: must end with "${t.suffix}"` : t.format === "includes" ? `Invalid string: must include "${t.includes}"` : t.format === "regex" ? `Invalid string: must match pattern ${t.pattern}` : `Invalid ${d[t.format] ?? e.format}`;
|
|
73
|
+
}
|
|
74
|
+
case "not_multiple_of":
|
|
75
|
+
return `Invalid number: must be a multiple of ${e.divisor}`;
|
|
76
|
+
case "unrecognized_keys":
|
|
77
|
+
return `Unrecognized key${e.keys.length > 1 ? "s" : ""}: ${a(e.keys, ", ")}`;
|
|
78
|
+
case "invalid_key":
|
|
79
|
+
return `Invalid key in ${e.origin}`;
|
|
80
|
+
case "invalid_union":
|
|
81
|
+
return e.options && Array.isArray(e.options) && e.options.length > 0 ? `Invalid discriminator value. Expected ${e.options.map((n) => `'${n}'`).join(" | ")}` : e.inclusive === !1 ? "Invalid input: more than one option matched" : "Invalid input";
|
|
82
|
+
case "invalid_element":
|
|
83
|
+
return `Invalid value in ${e.origin}`;
|
|
84
|
+
default:
|
|
85
|
+
return "Invalid input";
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
function g() {
|
|
90
|
+
return {
|
|
91
|
+
localeError: m()
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
g as default
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.js","sources":["../../../../../../../node_modules/zod/v4/locales/en.js"],"sourcesContent":["import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"characters\", verb: \"to have\" },\n file: { unit: \"bytes\", verb: \"to have\" },\n array: { unit: \"items\", verb: \"to have\" },\n set: { unit: \"items\", verb: \"to have\" },\n map: { unit: \"entries\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n mac: \"MAC address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n currency_code: \"currency code\",\n credit_card: \"credit card number\",\n iban: \"IBAN\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n // type names: missing keys = do not translate (use raw value via ?? fallback)\n const TypeDictionary = {\n // Compatibility: \"nan\" -> \"NaN\" for display\n nan: \"NaN\",\n // All other type names omitted - they fall back to raw values via ?? operator\n };\n function getTypeName(type, input) {\n if (type === \"number\" && typeof input === \"number\" && !Number.isFinite(input)) {\n return String(input);\n }\n return TypeDictionary[type] ?? type;\n }\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = getTypeName(issue.expected);\n const receivedType = util.parsedType(issue.input);\n const received = getTypeName(receivedType, issue.input);\n return `Invalid input: expected ${expected}, received ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.exact ? \"exactly \" : issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.exact ? \"exactly \" : issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Invalid string: must start with \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Invalid string: must end with \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Invalid string: must include \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Invalid string: must match pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Invalid number: must be a multiple of ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Invalid key in ${issue.origin}`;\n case \"invalid_union\":\n if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {\n const opts = issue.options.map((o) => `'${o}'`).join(\" | \");\n return `Invalid discriminator value. Expected ${opts}`;\n }\n if (issue.inclusive === false) {\n return \"Invalid input: more than one option matched\";\n }\n return \"Invalid input\";\n case \"invalid_element\":\n return `Invalid value in ${issue.origin}`;\n default:\n return `Invalid input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n"],"names":["error","Sizable","getSizing","origin","FormatDictionary","TypeDictionary","getTypeName","type","input","issue","expected","receivedType","util.parsedType","received","util.stringifyPrimitive","util.joinValues","adj","sizing","_issue","o","en"],"mappings":";AACA,MAAMA,IAAQ,MAAM;AAChB,QAAMC,IAAU;AAAA,IACZ,QAAQ,EAAE,MAAM,cAAc,MAAM,UAAS;AAAA,IAC7C,MAAM,EAAE,MAAM,SAAS,MAAM,UAAS;AAAA,IACtC,OAAO,EAAE,MAAM,SAAS,MAAM,UAAS;AAAA,IACvC,KAAK,EAAE,MAAM,SAAS,MAAM,UAAS;AAAA,IACrC,KAAK,EAAE,MAAM,WAAW,MAAM,UAAS;AAAA,EAC/C;AACI,WAASC,EAAUC,GAAQ;AACvB,WAAOF,EAAQE,CAAM,KAAK;AAAA,EAC9B;AACA,QAAMC,IAAmB;AAAA,IACrB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,IACb,MAAM;AAAA,IACN,eAAe;AAAA,IACf,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,IACL,kBAAkB;AAAA,EAC1B,GAEUC,IAAiB;AAAA;AAAA,IAEnB,KAAK;AAAA;AAAA,EAEb;AACI,WAASC,EAAYC,GAAMC,GAAO;AAC9B,WAAID,MAAS,YAAY,OAAOC,KAAU,YAAY,CAAC,OAAO,SAASA,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AAkCA,EAAO,MAAM,MACtDA,EAAO,WAAW,aACX,iCAAiCA,EAAO,QAAQ,MACvDA,EAAO,WAAW,UACX,sCAAsCA,EAAO,OAAO,KACxD,WAAWd,EAAiBc,EAAO,MAAM,KAAKT,EAAM,MAAM;AAAA,MACrE;AAAA,MACA,KAAK;AACD,eAAO,yCAAyCA,EAAM,OAAO;AAAA,MACjE,KAAK;AACD,eAAO,mBAAmBA,EAAM,KAAK,SAAS,IAAI,MAAM,EAAE,KAAKM,EAAgBN,EAAM,MAAM,IAAI,CAAC;AAAA,MACpG,KAAK;AACD,eAAO,kBAAkBA,EAAM,MAAM;AAAA,MACzC,KAAK;AACD,eAAIA,EAAM,WAAW,MAAM,QAAQA,EAAM,OAAO,KAAKA,EAAM,QAAQ,SAAS,IAEjE,yCADMA,EAAM,QAAQ,IAAI,CAACU,MAAM,IAAIA,CAAC,GAAG,EAAE,KAAK,KAAK,CACN,KAEpDV,EAAM,cAAc,KACb,gDAEJ;AAAA,MACX,KAAK;AACD,eAAO,oBAAoBA,EAAM,MAAM;AAAA,MAC3C;AACI,eAAO;AAAA,IACvB;AAAA,EACI;AACJ;AACe,SAAAW,IAAY;AACvB,SAAO;AAAA,IACH,aAAapB,EAAK;AAAA,EAC1B;AACA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ActionEvent } from '@openuidev/react-lang';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
|
+
export declare const CopyToClipboard: import("@openuidev/lang-core").DefinedAction<z.ZodObject<{
|
|
4
|
+
text: z.ZodString;
|
|
5
|
+
}, z.core.$strip>, "CopyToClipboard">;
|
|
6
|
+
export declare const actions: import("@openuidev/lang-core").DefinedAction<z.ZodObject<{
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
}, z.core.$strip>, "CopyToClipboard">[];
|
|
9
|
+
/**
|
|
10
|
+
* Custom actions + http(s) @OpenUrl. Returns null when the host must handle
|
|
11
|
+
* the event (@ToAssistant).
|
|
12
|
+
*/
|
|
13
|
+
export declare function runLibraryAction(event: ActionEvent): Promise<boolean> | boolean | null;
|
|
14
|
+
/** User-turn text for @ToAssistant: message + optional context + form values. */
|
|
15
|
+
export declare function toAssistantUserText(event: ActionEvent): string;
|
|
16
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/openui/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,eAAO,MAAM,eAAe;;qCAI1B,CAAC;AAEH,eAAO,MAAM,OAAO;;uCAAoB,CAAC;AAuCzC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,IAAI,CAoBtF;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAqB9D"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineAction as s, BuiltinActionType as a } from "@openuidev/react-lang";
|
|
2
|
+
import { object as c, string as p } from "../node_modules/zod/v4/classic/schemas.js";
|
|
3
|
+
const i = s({
|
|
4
|
+
name: "CopyToClipboard",
|
|
5
|
+
description: "Copy text to the clipboard, e.g. a list built with @Join",
|
|
6
|
+
params: c({
|
|
7
|
+
text: p()
|
|
8
|
+
})
|
|
9
|
+
}), y = [i];
|
|
10
|
+
function l(n) {
|
|
11
|
+
if (typeof n != "string")
|
|
12
|
+
return null;
|
|
13
|
+
try {
|
|
14
|
+
const t = new URL(n);
|
|
15
|
+
return t.protocol === "http:" || t.protocol === "https:" ? t.href : null;
|
|
16
|
+
} catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async function u(n) {
|
|
21
|
+
try {
|
|
22
|
+
return await navigator.clipboard.writeText(n), !0;
|
|
23
|
+
} catch {
|
|
24
|
+
const t = document.createElement("textarea");
|
|
25
|
+
t.value = n, t.setAttribute("readonly", ""), t.style.cssText = "position:fixed;opacity:0;pointer-events:none", document.body.append(t), t.select();
|
|
26
|
+
const r = document.execCommand("copy");
|
|
27
|
+
return t.remove(), r;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function d(n) {
|
|
31
|
+
if (n.type === i.name) {
|
|
32
|
+
const t = n.params.text;
|
|
33
|
+
return typeof t == "string" ? u(t) : Promise.resolve(!1);
|
|
34
|
+
}
|
|
35
|
+
if (n.type === a.OpenUrl) {
|
|
36
|
+
const t = l(n.params.url);
|
|
37
|
+
return t ? (window.open(t, "_blank", "noopener,noreferrer"), !0) : !1;
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
function h(n) {
|
|
42
|
+
const t = [], r = n.humanFriendlyMessage.trim();
|
|
43
|
+
r && t.push(r);
|
|
44
|
+
const e = n.params.context;
|
|
45
|
+
e !== void 0 && t.push(typeof e == "string" ? e : JSON.stringify(e, null, 2));
|
|
46
|
+
const o = n.formState;
|
|
47
|
+
return o && Object.keys(o).length > 0 && t.push(`Form values:
|
|
48
|
+
${JSON.stringify(o, null, 2)}`), t.join(`
|
|
49
|
+
|
|
50
|
+
`);
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
i as CopyToClipboard,
|
|
54
|
+
y as actions,
|
|
55
|
+
d as runLibraryAction,
|
|
56
|
+
h as toAssistantUserText
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sources":["../../src/openui/actions.ts"],"sourcesContent":["import { BuiltinActionType, defineAction, type ActionEvent } from '@openuidev/react-lang';\nimport { z } from 'zod/v4';\n\nexport const CopyToClipboard = defineAction({\n name: 'CopyToClipboard',\n description: 'Copy text to the clipboard, e.g. a list built with @Join',\n params: z.object({ text: z.string() }),\n});\n\nexport const actions = [CopyToClipboard];\n\nfunction httpUrl(value: unknown): string | null {\n if (typeof value !== 'string') {\n return null;\n }\n\n try {\n const url = new URL(value);\n\n return url.protocol === 'http:' || url.protocol === 'https:' ? url.href : null;\n }\n catch {\n return null;\n }\n}\n\nasync function copy(text: string): Promise<boolean> {\n try {\n await navigator.clipboard.writeText(text);\n\n return true;\n }\n catch {\n const area = document.createElement('textarea');\n\n area.value = text;\n area.setAttribute('readonly', '');\n area.style.cssText = 'position:fixed;opacity:0;pointer-events:none';\n document.body.append(area);\n area.select();\n const ok = document.execCommand('copy');\n\n area.remove();\n\n return ok;\n }\n}\n\n/**\n * Custom actions + http(s) @OpenUrl. Returns null when the host must handle\n * the event (@ToAssistant).\n */\nexport function runLibraryAction(event: ActionEvent): Promise<boolean> | boolean | null {\n if (event.type === CopyToClipboard.name) {\n const text = (event.params as { text?: unknown }).text;\n\n return typeof text === 'string' ? copy(text) : Promise.resolve(false);\n }\n\n if (event.type === BuiltinActionType.OpenUrl) {\n const url = httpUrl(event.params.url);\n\n if (!url) {\n return false;\n }\n\n window.open(url, '_blank', 'noopener,noreferrer');\n\n return true;\n }\n\n return null;\n}\n\n/** User-turn text for @ToAssistant: message + optional context + form values. */\nexport function toAssistantUserText(event: ActionEvent): string {\n const parts: string[] = [];\n const message = event.humanFriendlyMessage.trim();\n\n if (message) {\n parts.push(message);\n }\n\n const context = event.params.context;\n\n if (context !== undefined) {\n parts.push(typeof context === 'string' ? context : JSON.stringify(context, null, 2));\n }\n\n const form = event.formState;\n\n if (form && Object.keys(form).length > 0) {\n parts.push(`Form values:\\n${JSON.stringify(form, null, 2)}`);\n }\n\n return parts.join('\\n\\n');\n}\n"],"names":["CopyToClipboard","defineAction","z.object","z.string","actions","httpUrl","value","url","copy","text","area","ok","runLibraryAction","event","BuiltinActionType","toAssistantUserText","parts","message","context","form"],"mappings":";;AAEO,M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C,IAAUL,EAAM,OAAO;AAC7B,EAAIK,MAAY,UACdF,EAAM,KAAK,OAAOE,KAAY,WAAWA,IAAU,KAAK,UAAUA,GAAS,MAAM,CAAC,CAAC;AAErF,QAAMC,IAAON,EAAM;AACnB,SAAIM,KAAQ,OAAO,KAAKA,CAAI,EAAE,SAAS,KACrCH,EAAM,KAAK;AAAA,EAAiB,KAAK,UAAUG,GAAM,MAAM,CAAC,CAAC,EAAE,GAEtDH,EAAM,KAAK;AAAA;AAAA,CAAM;AAC1B;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const Button: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{
|
|
3
|
+
label: z.ZodString;
|
|
4
|
+
action: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<"open_url">;
|
|
6
|
+
url: z.ZodString;
|
|
7
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8
|
+
type: z.ZodLiteral<"continue_conversation">;
|
|
9
|
+
context: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
type: z.ZodString;
|
|
12
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
13
|
+
}, z.core.$strip>]>>;
|
|
14
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
ghost: "ghost";
|
|
16
|
+
outline: "outline";
|
|
17
|
+
soft: "soft";
|
|
18
|
+
solid: "solid";
|
|
19
|
+
}>>;
|
|
20
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
danger: "danger";
|
|
22
|
+
primary: "primary";
|
|
23
|
+
success: "success";
|
|
24
|
+
}>>;
|
|
25
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
lg: "lg";
|
|
27
|
+
md: "md";
|
|
28
|
+
sm: "sm";
|
|
29
|
+
}>>;
|
|
30
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
31
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
block: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
//# sourceMappingURL=controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/openui/components/controls.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AA2C3B,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKjB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as s, useTriggerAction as c, action as r } from "@openuidev/react-lang";
|
|
2
|
+
import { Button as d } from "../../Button/Button.js";
|
|
3
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
4
|
+
import { object as u, boolean as n, string as i, enum as t } from "../../node_modules/zod/v4/classic/schemas.js";
|
|
5
|
+
const b = u({
|
|
6
|
+
label: i(),
|
|
7
|
+
action: r().optional(),
|
|
8
|
+
variant: t(["solid", "outline", "soft", "ghost"]).optional(),
|
|
9
|
+
color: t(["primary", "danger", "success"]).optional(),
|
|
10
|
+
size: t(["sm", "md", "lg"]).optional(),
|
|
11
|
+
icon: i().optional(),
|
|
12
|
+
disabled: n().optional(),
|
|
13
|
+
block: n().optional()
|
|
14
|
+
});
|
|
15
|
+
function g({
|
|
16
|
+
props: o
|
|
17
|
+
}) {
|
|
18
|
+
const e = c(), a = o.variant === "outline" || o.variant === "ghost" ? "bordered" : o.variant === "soft" ? "filling" : "filled", l = o.size === "sm" ? "sm" : o.size === "lg" ? "lg" : "md";
|
|
19
|
+
return /* @__PURE__ */ m(d, {
|
|
20
|
+
size: l,
|
|
21
|
+
variant: a,
|
|
22
|
+
color: o.color === "danger" ? "danger" : o.color === "success" ? "success" : void 0,
|
|
23
|
+
isDisabled: o.disabled,
|
|
24
|
+
fullWidth: o.block,
|
|
25
|
+
onPress: () => {
|
|
26
|
+
e(o.label, void 0, o.action);
|
|
27
|
+
},
|
|
28
|
+
children: o.label
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const z = s({
|
|
32
|
+
name: "Button",
|
|
33
|
+
props: b,
|
|
34
|
+
description: "Without action, the button sends its label to the assistant via @ToAssistant.",
|
|
35
|
+
component: g
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
z as Button
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=controls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controls.js","sources":["../../../src/openui/components/controls.tsx"],"sourcesContent":["import {\n action,\n defineComponent,\n useTriggerAction,\n type ComponentRenderProps,\n} from '@openuidev/react-lang';\nimport { z } from 'zod/v4';\n\nimport { Button as ReformaButton } from '../../Button';\n\nconst buttonProps = z.object({\n label: z.string(),\n action: action().optional(),\n variant: z.enum(['solid', 'outline', 'soft', 'ghost']).optional(),\n color: z.enum(['primary', 'danger', 'success']).optional(),\n size: z.enum(['sm', 'md', 'lg']).optional(),\n icon: z.string().optional(),\n disabled: z.boolean().optional(),\n block: z.boolean().optional(),\n});\n\ntype ButtonProps = z.infer<typeof buttonProps>;\n\nfunction OpenUiButton({ props }: ComponentRenderProps<ButtonProps>) {\n const trigger = useTriggerAction();\n const variant = props.variant === 'outline' || props.variant === 'ghost'\n ? 'bordered'\n : props.variant === 'soft'\n ? 'filling'\n : 'filled';\n\n const size = props.size === 'sm' ? 'sm' : props.size === 'lg' ? 'lg' : 'md';\n\n return (\n <ReformaButton\n size={ size }\n variant={ variant }\n color={ props.color === 'danger' ? 'danger' : props.color === 'success' ? 'success' : undefined }\n isDisabled={ props.disabled }\n fullWidth={ props.block }\n onPress={ () => {\n void trigger(props.label, undefined, props.action);\n } }\n >\n {props.label}\n </ReformaButton>\n );\n}\n\nexport const Button = defineComponent({\n name: 'Button',\n props: buttonProps,\n description: 'Without action, the button sends its label to the assistant via @ToAssistant.',\n component: OpenUiButton,\n});\n"],"names":["buttonProps","z.object","z.string","action","z.enum","z.boolean","OpenUiButton","props","trigger","useTriggerAction","variant","size","ReformaButton","Button","defineComponent"],"mappings":";;;;AAIA,MAAMA,IAAcC,EAAS;AAAA,EAC3B,OAAOC,EAAE;AAAA,EACT,QAAQC,EAAA,EAAS,SAAA;AAAA,EACjB,SAASC,EAAO,CAAC,SAAS,WAAW,QAAQ,OAAO,CAAC,EAAE,SAAA;AAAA,EACvD,OAAOA,EAAO,CAAC,WAAW,UAAU,SAAS,CAAC,EAAE,SAAA;AAAA,EAChD,MAAMA,EAAO,CAAC,MAAM,MAAM,IAAI,CAAC,EAAE,SAAA;AAAA,EACjC,MAAMF,EAAE,EAAS,SAAA;AAAA,EACjB,UAAUG,EAAE,EAAU,SAAA;AAAA,EACtB,OAAOA,EAAE,EAAU,SAAA;AACrB,CAAC;AACD,SAASC,EAAa;AAAA,EACpB,OAAAC;AACF,GAAG;AACD,QAAMC,IAAUC,EAAA,GACVC,IAAUH,EAAM,YAAY,aAAaA,EAAM,YAAY,UAAU,aAAaA,EAAM,YAAY,SAAS,YAAY,UACzHI,IAAOJ,EAAM,SAAS,OAAO,OAAOA,EAAM,SAAS,OAAO,OAAO;AACvE,2BAAyBK,GAAe;AAAA,IACtC,MAAAD;AAAA,IACA,SAAAD;AAAA,IACA,OAAOH,EAAM,UAAU,WAAW,WAAWA,EAAM,UAAU,YAAY,YAAY;AAAA,IACrF,YAAYA,EAAM;AAAA,IAClB,WAAWA,EAAM;AAAA,IACjB,SAAS,MAAM;AACb,MAAKC,EAAQD,EAAM,OAAO,QAAWA,EAAM,MAAM;AAAA,IACnD;AAAA,IACA,UAAUA,EAAM;AAAA,EAAA,CACjB;AACH;AACO,MAAMM,IAASC,EAAgB;AAAA,EACpC,MAAM;AAAA,EACN,OAAOd;AAAA,EACP,aAAa;AAAA,EACb,WAAWM;AACb,CAAC;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const Col: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{
|
|
3
|
+
children: z.ZodAny;
|
|
4
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
center: "center";
|
|
7
|
+
end: "end";
|
|
8
|
+
start: "start";
|
|
9
|
+
stretch: "stretch";
|
|
10
|
+
}>>;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
export declare const Row: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{
|
|
13
|
+
children: z.ZodAny;
|
|
14
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
center: "center";
|
|
17
|
+
end: "end";
|
|
18
|
+
start: "start";
|
|
19
|
+
stretch: "stretch";
|
|
20
|
+
}>>;
|
|
21
|
+
justify: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
between: "between";
|
|
23
|
+
center: "center";
|
|
24
|
+
end: "end";
|
|
25
|
+
start: "start";
|
|
26
|
+
}>>;
|
|
27
|
+
wrap: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
export declare const BoxLayout: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{
|
|
30
|
+
children: z.ZodOptional<z.ZodAny>;
|
|
31
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
col: "col";
|
|
33
|
+
row: "row";
|
|
34
|
+
}>>;
|
|
35
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
background: z.ZodOptional<z.ZodString>;
|
|
38
|
+
radius: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
39
|
+
border: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
41
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
42
|
+
flex: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
align: z.ZodOptional<z.ZodEnum<{
|
|
44
|
+
center: "center";
|
|
45
|
+
end: "end";
|
|
46
|
+
start: "start";
|
|
47
|
+
stretch: "stretch";
|
|
48
|
+
}>>;
|
|
49
|
+
justify: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
between: "between";
|
|
51
|
+
center: "center";
|
|
52
|
+
end: "end";
|
|
53
|
+
start: "start";
|
|
54
|
+
}>>;
|
|
55
|
+
wrap: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
export declare const Grid: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{
|
|
58
|
+
children: z.ZodAny;
|
|
59
|
+
columns: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
minChildWidth: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
export declare const Card: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{
|
|
64
|
+
children: z.ZodAny;
|
|
65
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
outline: "outline";
|
|
67
|
+
soft: "soft";
|
|
68
|
+
}>>;
|
|
69
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
export declare const Divider: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{}, z.core.$strip>>;
|
|
73
|
+
export declare const Spacer: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{}, z.core.$strip>>;
|
|
74
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/openui/components/layout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAO3B,eAAO,MAAM,GAAG;;;;;;;;;kBAkBd,CAAC;AAEH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;kBAsBd,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0CpB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;kBAyBf,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;kBAoBf,CAAC;AAEH,eAAO,MAAM,OAAO,kFAKlB,CAAC;AAEH,eAAO,MAAM,MAAM,kFAKjB,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { defineComponent as t } from "@openuidev/react-lang";
|
|
2
|
+
import { Box as r } from "../../Box/Box.js";
|
|
3
|
+
import { Card as x } from "../../Card/Card.js";
|
|
4
|
+
import { Separator as y } from "../../Separator/Separator.js";
|
|
5
|
+
import { flexAlign as g, gapToken as a, align as h, flexJustify as f, justify as p, children as d } from "../schema.js";
|
|
6
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
7
|
+
import { object as l, number as n, boolean as u, union as m, string as c, enum as s } from "../../node_modules/zod/v4/classic/schemas.js";
|
|
8
|
+
const z = t({
|
|
9
|
+
name: "Col",
|
|
10
|
+
props: l({
|
|
11
|
+
children: d,
|
|
12
|
+
gap: n().optional(),
|
|
13
|
+
align: h.optional()
|
|
14
|
+
}),
|
|
15
|
+
description: "Vertical layout. Without gap it spaces blocks like an article.",
|
|
16
|
+
component: ({
|
|
17
|
+
props: i,
|
|
18
|
+
renderNode: o
|
|
19
|
+
}) => /* @__PURE__ */ e(r, {
|
|
20
|
+
direction: "column",
|
|
21
|
+
gap: a(i.gap) ?? "lg",
|
|
22
|
+
align: g(i.align),
|
|
23
|
+
fullWidth: !0,
|
|
24
|
+
children: o(i.children)
|
|
25
|
+
})
|
|
26
|
+
}), B = t({
|
|
27
|
+
name: "Row",
|
|
28
|
+
props: l({
|
|
29
|
+
children: d,
|
|
30
|
+
gap: n().optional(),
|
|
31
|
+
align: h.optional(),
|
|
32
|
+
justify: p.optional(),
|
|
33
|
+
wrap: u().optional()
|
|
34
|
+
}),
|
|
35
|
+
description: "Horizontal layout; items are vertically centered.",
|
|
36
|
+
component: ({
|
|
37
|
+
props: i,
|
|
38
|
+
renderNode: o
|
|
39
|
+
}) => /* @__PURE__ */ e(r, {
|
|
40
|
+
direction: "row",
|
|
41
|
+
gap: a(i.gap) ?? "md",
|
|
42
|
+
align: g(i.align) ?? "center",
|
|
43
|
+
justify: f(i.justify),
|
|
44
|
+
wrap: i.wrap ? "wrap" : void 0,
|
|
45
|
+
fullWidth: !0,
|
|
46
|
+
children: o(i.children)
|
|
47
|
+
})
|
|
48
|
+
}), M = t({
|
|
49
|
+
name: "Box",
|
|
50
|
+
props: l({
|
|
51
|
+
children: d.optional(),
|
|
52
|
+
direction: s(["row", "col"]).optional(),
|
|
53
|
+
gap: n().optional(),
|
|
54
|
+
padding: n().optional(),
|
|
55
|
+
background: c().optional(),
|
|
56
|
+
radius: m([c(), n()]).optional(),
|
|
57
|
+
border: u().optional(),
|
|
58
|
+
width: m([c(), n()]).optional(),
|
|
59
|
+
height: m([c(), n()]).optional(),
|
|
60
|
+
flex: n().optional(),
|
|
61
|
+
align: h.optional(),
|
|
62
|
+
justify: p.optional(),
|
|
63
|
+
wrap: u().optional()
|
|
64
|
+
}),
|
|
65
|
+
description: "Flex container, a column by default.",
|
|
66
|
+
component: ({
|
|
67
|
+
props: i,
|
|
68
|
+
renderNode: o
|
|
69
|
+
}) => /* @__PURE__ */ e(r, {
|
|
70
|
+
direction: i.direction === "row" ? "row" : "column",
|
|
71
|
+
gap: a(i.gap),
|
|
72
|
+
padding: a(i.padding),
|
|
73
|
+
align: g(i.align),
|
|
74
|
+
justify: f(i.justify),
|
|
75
|
+
wrap: i.wrap ? "wrap" : void 0,
|
|
76
|
+
background: i.background === "surface" ? "surface" : void 0,
|
|
77
|
+
style: {
|
|
78
|
+
width: (typeof i.width == "number", i.width),
|
|
79
|
+
height: (typeof i.height == "number", i.height),
|
|
80
|
+
flex: i.flex != null ? `${Math.max(0, i.flex)} 1 0%` : void 0,
|
|
81
|
+
border: i.border ? "1px solid var(--color-surface-border)" : void 0,
|
|
82
|
+
borderRadius: i.radius === "full" ? "9999px" : typeof i.radius == "number" ? i.radius : void 0
|
|
83
|
+
},
|
|
84
|
+
children: o(i.children)
|
|
85
|
+
})
|
|
86
|
+
}), S = t({
|
|
87
|
+
name: "Grid",
|
|
88
|
+
props: l({
|
|
89
|
+
children: d,
|
|
90
|
+
columns: n().optional(),
|
|
91
|
+
minChildWidth: n().optional(),
|
|
92
|
+
gap: n().optional()
|
|
93
|
+
}),
|
|
94
|
+
description: "Equal columns (default 2). With minChildWidth (px), columns drop on narrow screens.",
|
|
95
|
+
component: ({
|
|
96
|
+
props: i,
|
|
97
|
+
renderNode: o
|
|
98
|
+
}) => {
|
|
99
|
+
const w = Math.min(6, Math.max(1, i.columns ?? 2));
|
|
100
|
+
return /* @__PURE__ */ e(r, {
|
|
101
|
+
columns: w,
|
|
102
|
+
gap: a(i.gap) ?? "lg",
|
|
103
|
+
fullWidth: !0,
|
|
104
|
+
style: i.minChildWidth ? {
|
|
105
|
+
gridTemplateColumns: `repeat(auto-fill, minmax(${i.minChildWidth}px, 1fr))`
|
|
106
|
+
} : void 0,
|
|
107
|
+
children: o(i.children)
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}), $ = t({
|
|
111
|
+
name: "Card",
|
|
112
|
+
props: l({
|
|
113
|
+
children: d,
|
|
114
|
+
variant: s(["outline", "soft"]).optional(),
|
|
115
|
+
padding: n().optional(),
|
|
116
|
+
gap: n().optional()
|
|
117
|
+
}),
|
|
118
|
+
description: "Panel with a border; soft is a filled panel for summaries.",
|
|
119
|
+
component: ({
|
|
120
|
+
props: i,
|
|
121
|
+
renderNode: o
|
|
122
|
+
}) => /* @__PURE__ */ e(x, {
|
|
123
|
+
variant: i.variant === "soft" ? "filled" : "bordered",
|
|
124
|
+
size: "lg",
|
|
125
|
+
padding: a(i.padding),
|
|
126
|
+
gap: a(i.gap) ?? "md",
|
|
127
|
+
fullWidth: !0,
|
|
128
|
+
children: o(i.children)
|
|
129
|
+
})
|
|
130
|
+
}), D = t({
|
|
131
|
+
name: "Divider",
|
|
132
|
+
props: l({}),
|
|
133
|
+
description: "Horizontal rule.",
|
|
134
|
+
component: () => /* @__PURE__ */ e(y, {})
|
|
135
|
+
}), F = t({
|
|
136
|
+
name: "Spacer",
|
|
137
|
+
props: l({}),
|
|
138
|
+
description: "Fills the free space in a Row.",
|
|
139
|
+
component: () => /* @__PURE__ */ e(r, {
|
|
140
|
+
style: {
|
|
141
|
+
flex: 1
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
});
|
|
145
|
+
export {
|
|
146
|
+
M as BoxLayout,
|
|
147
|
+
$ as Card,
|
|
148
|
+
z as Col,
|
|
149
|
+
D as Divider,
|
|
150
|
+
S as Grid,
|
|
151
|
+
B as Row,
|
|
152
|
+
F as Spacer
|
|
153
|
+
};
|
|
154
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sources":["../../../src/openui/components/layout.tsx"],"sourcesContent":["import { defineComponent } from '@openuidev/react-lang';\nimport { z } from 'zod/v4';\n\nimport { Box } from '../../Box';\nimport { Card as ReformaCard } from '../../Card';\nimport { Separator } from '../../Separator';\nimport { align, children, flexAlign, flexJustify, gapToken, justify } from '../schema';\n\nexport const Col = defineComponent({\n name: 'Col',\n props: z.object({\n children,\n gap: z.number().optional(),\n align: align.optional(),\n }),\n description: 'Vertical layout. Without gap it spaces blocks like an article.',\n component: ({ props, renderNode }) => (\n <Box\n direction=\"column\"\n gap={ gapToken(props.gap) ?? 'lg' }\n align={ flexAlign(props.align) }\n fullWidth\n >\n {renderNode(props.children)}\n </Box>\n ),\n});\n\nexport const Row = defineComponent({\n name: 'Row',\n props: z.object({\n children,\n gap: z.number().optional(),\n align: align.optional(),\n justify: justify.optional(),\n wrap: z.boolean().optional(),\n }),\n description: 'Horizontal layout; items are vertically centered.',\n component: ({ props, renderNode }) => (\n <Box\n direction=\"row\"\n gap={ gapToken(props.gap) ?? 'md' }\n align={ flexAlign(props.align) ?? 'center' }\n justify={ flexJustify(props.justify) }\n wrap={ props.wrap ? 'wrap' : undefined }\n fullWidth\n >\n {renderNode(props.children)}\n </Box>\n ),\n});\n\nexport const BoxLayout = defineComponent({\n name: 'Box',\n props: z.object({\n children: children.optional(),\n direction: z.enum(['row', 'col']).optional(),\n gap: z.number().optional(),\n padding: z.number().optional(),\n background: z.string().optional(),\n radius: z.union([z.string(), z.number()]).optional(),\n border: z.boolean().optional(),\n width: z.union([z.string(), z.number()]).optional(),\n height: z.union([z.string(), z.number()]).optional(),\n flex: z.number().optional(),\n align: align.optional(),\n justify: justify.optional(),\n wrap: z.boolean().optional(),\n }),\n description: 'Flex container, a column by default.',\n component: ({ props, renderNode }) => (\n <Box\n direction={ props.direction === 'row' ? 'row' : 'column' }\n gap={ gapToken(props.gap) }\n padding={ gapToken(props.padding) }\n align={ flexAlign(props.align) }\n justify={ flexJustify(props.justify) }\n wrap={ props.wrap ? 'wrap' : undefined }\n background={ props.background === 'surface' ? 'surface' : undefined }\n style={{\n width: typeof props.width === 'number' ? props.width : props.width,\n height: typeof props.height === 'number' ? props.height : props.height,\n flex: props.flex != null ? `${Math.max(0, props.flex)} 1 0%` : undefined,\n border: props.border ? '1px solid var(--color-surface-border)' : undefined,\n borderRadius: props.radius === 'full'\n ? '9999px'\n : typeof props.radius === 'number'\n ? props.radius\n : undefined,\n }}\n >\n {renderNode(props.children)}\n </Box>\n ),\n});\n\nexport const Grid = defineComponent({\n name: 'Grid',\n props: z.object({\n children,\n columns: z.number().optional(),\n minChildWidth: z.number().optional(),\n gap: z.number().optional(),\n }),\n description: 'Equal columns (default 2). With minChildWidth (px), columns drop on narrow screens.',\n component: ({ props, renderNode }) => {\n const columns = Math.min(6, Math.max(1, props.columns ?? 2));\n\n return (\n <Box\n columns={ columns as 1 | 2 | 3 | 4 | 5 | 6 }\n gap={ gapToken(props.gap) ?? 'lg' }\n fullWidth\n style={ props.minChildWidth\n ? { gridTemplateColumns: `repeat(auto-fill, minmax(${props.minChildWidth}px, 1fr))` }\n : undefined }\n >\n {renderNode(props.children)}\n </Box>\n );\n },\n});\n\nexport const Card = defineComponent({\n name: 'Card',\n props: z.object({\n children,\n variant: z.enum(['outline', 'soft']).optional(),\n padding: z.number().optional(),\n gap: z.number().optional(),\n }),\n description: 'Panel with a border; soft is a filled panel for summaries.',\n component: ({ props, renderNode }) => (\n <ReformaCard\n variant={ props.variant === 'soft' ? 'filled' : 'bordered' }\n size=\"lg\"\n padding={ gapToken(props.padding) }\n gap={ gapToken(props.gap) ?? 'md' }\n fullWidth\n >\n {renderNode(props.children)}\n </ReformaCard>\n ),\n});\n\nexport const Divider = defineComponent({\n name: 'Divider',\n props: z.object({}),\n description: 'Horizontal rule.',\n component: () => <Separator />,\n});\n\nexport const Spacer = defineComponent({\n name: 'Spacer',\n props: z.object({}),\n description: 'Fills the free space in a Row.',\n component: () => <Box style={{ flex: 1 }} />,\n});\n"],"names":["Col","defineComponent","z.object","children","z.number","align","props","renderNode","Box","gapToken","flexAlign","Row","justify","z.boolean","flexJustify","BoxLayout","z.enum","z.string","z.union","Grid","columns","Card","ReformaCard","Divider","_jsx","Separator","Spacer"],"mappings":";;;;;;;AAOO,MAAMA,IAAMC,EAAgB;AAAA,EACjC,MAAM;AAAA,EACN,OAAOC,EAAS;AAAA,IACd,UAAAC;AAAA,IACA,KAAKC,EAAE,EAAS,SAAA;AAAA,IAChB,OAAOC,EAAM,SAAA;AAAA,EAAS,CACvB;AAAA,EACD,aAAa;AAAA,EACb,WAAW,CAAC;AAA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A,EAAKC,GAAW,CAAA,CAAE;AAClD,CAAC,GACYC,IAASzB,EAAgB;AAAA,EACpC,MAAM;AAAA,EACN,OAAOC,EAAS,EAAE;AAAA,EAClB,aAAa;AAAA,EACb,WAAW,MAAmBsB,gBAAAA,EAAKhB,GAAK;AAAA,IACtC,OAAO;AAAA,MACL,MAAM;AAAA,IAAA;AAAA,EACR,CACD;AACH,CAAC;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const ListItem: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{
|
|
3
|
+
title: z.ZodString;
|
|
4
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5
|
+
marker: z.ZodOptional<z.ZodString>;
|
|
6
|
+
children: z.ZodOptional<z.ZodAny>;
|
|
7
|
+
}, z.core.$strip>>;
|
|
8
|
+
export declare const List: import("@openuidev/react-lang").DefinedComponent<z.ZodObject<{
|
|
9
|
+
items: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
10
|
+
marker: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
bullet: "bullet";
|
|
12
|
+
none: "none";
|
|
13
|
+
number: "number";
|
|
14
|
+
}>>;
|
|
15
|
+
timeline: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/openui/components/list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAM3B,eAAO,MAAM,QAAQ;;;;;kBAqBnB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;kBA4Df,CAAC"}
|