@voltro/ui 0.86.0 → 0.87.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/CHANGELOG.md +5321 -0
- package/THIRD-PARTY-NOTICES.md +1132 -13
- package/dist/achievementStrings.js +29 -0
- package/dist/autoForm.js +52 -39
- package/dist/index.d.ts +38 -0
- package/dist/index.js +16 -14
- package/dist/questStrings.js +41 -0
- package/dist/strings.js +22 -10
- package/package.json +3 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/achievementStrings.ts
|
|
2
|
+
var e = {
|
|
3
|
+
en: {
|
|
4
|
+
title: "Achievements",
|
|
5
|
+
loading: "Loading achievements…",
|
|
6
|
+
empty: "No visible achievements.",
|
|
7
|
+
unavailable: "Achievements could not be loaded. Reconnect to try again.",
|
|
8
|
+
invalid: "Achievement data is invalid. Reconnect to request it again.",
|
|
9
|
+
locked: "In progress",
|
|
10
|
+
unlocked: "Unlocked",
|
|
11
|
+
tier: (e) => `Tier ${e}`,
|
|
12
|
+
progress: (e, t, n) => `${e}: ${t} of ${n}`,
|
|
13
|
+
unlockedDate: (e) => `Unlocked ${e}`
|
|
14
|
+
},
|
|
15
|
+
de: {
|
|
16
|
+
title: "Achievements",
|
|
17
|
+
loading: "Achievements werden geladen…",
|
|
18
|
+
empty: "Keine sichtbaren Achievements.",
|
|
19
|
+
unavailable: "Achievements konnten nicht geladen werden. Erneut verbinden und wieder versuchen.",
|
|
20
|
+
invalid: "Die Achievement-Daten sind ungültig. Erneut verbinden fordert sie neu an.",
|
|
21
|
+
locked: "In Arbeit",
|
|
22
|
+
unlocked: "Freigeschaltet",
|
|
23
|
+
tier: (e) => `Stufe ${e}`,
|
|
24
|
+
progress: (e, t, n) => `${e}: ${t} von ${n}`,
|
|
25
|
+
unlockedDate: (e) => `Freigeschaltet ${e}`
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { e as achievementUiStrings };
|
package/dist/autoForm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useWidget as e } from "./widgets.js";
|
|
2
2
|
import { createContext as t, useContext as n, useMemo as r } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as
|
|
3
|
+
import { FORM_CAPTURE_FIELD as i, FORM_KEY_FIELD as a, FORM_REDIRECT_FIELD as o, FORM_SOURCE_FIELD as s, FormBindingProvider as c, formActionPath as l, formSections as u, useFormBinding as d, useFormCapture as f, useFormFlash as p, useServerRequest as m } from "@voltro/client";
|
|
4
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
5
5
|
//#region src/autoForm.tsx
|
|
6
|
-
var
|
|
7
|
-
let e = n(
|
|
6
|
+
var v = t(null), y = () => {
|
|
7
|
+
let e = n(v);
|
|
8
8
|
if (e === null) throw Error("<Field> must be rendered inside <AutoForm>");
|
|
9
9
|
return e;
|
|
10
|
-
},
|
|
10
|
+
}, b = (e, t) => {
|
|
11
11
|
let n = e.field(t.name);
|
|
12
12
|
return {
|
|
13
13
|
name: t.name,
|
|
@@ -22,64 +22,77 @@ var p = t(null), m = () => {
|
|
|
22
22
|
...n.description === void 0 ? {} : { description: n.description },
|
|
23
23
|
...t.reference === void 0 ? {} : { reference: t.reference }
|
|
24
24
|
};
|
|
25
|
-
},
|
|
26
|
-
let { binding: r, fields: i } =
|
|
25
|
+
}, x = ({ name: t, children: n }) => {
|
|
26
|
+
let { binding: r, fields: i } = y(), a = i.get(t), o = e(a?.widget ?? "custom");
|
|
27
27
|
if (a === void 0) return null;
|
|
28
|
-
let s =
|
|
29
|
-
return n ? n(s) : /* @__PURE__ */
|
|
28
|
+
let s = b(r, a);
|
|
29
|
+
return n ? n(s) : /* @__PURE__ */ g(o, { ...s });
|
|
30
30
|
};
|
|
31
|
-
function
|
|
32
|
-
let t = e.formKey ?? e.mutation, n =
|
|
31
|
+
function S(e) {
|
|
32
|
+
let t = e.formKey ?? e.mutation, n = p(t), y = f(), b = m()?.url ?? (typeof window > "u" ? "" : window.location.pathname + window.location.search), S = n?.sourcePath ?? (y === void 0 ? b.includes("?") ? "" : b.split("#")[0] : b.split(/[?#]/)[0]), C = d(e.api, e.mutation, {
|
|
33
|
+
formKey: t,
|
|
33
34
|
...e.schema ? { schema: e.schema } : {},
|
|
34
35
|
...e.defaults ? { defaults: e.defaults } : {},
|
|
35
36
|
...n === void 0 ? {} : { flash: n }
|
|
36
|
-
}),
|
|
37
|
+
}), w = r(() => {
|
|
37
38
|
let e = /* @__PURE__ */ new Map();
|
|
38
|
-
for (let t of
|
|
39
|
+
for (let t of C.fields) e.has(t.name) || e.set(t.name, t);
|
|
39
40
|
return e;
|
|
40
|
-
}, [
|
|
41
|
-
binding:
|
|
42
|
-
fields:
|
|
43
|
-
}), [
|
|
44
|
-
t.preventDefault(),
|
|
41
|
+
}, [C.fields]), T = r(() => ({
|
|
42
|
+
binding: C,
|
|
43
|
+
fields: w
|
|
44
|
+
}), [C, w]), E = (t) => {
|
|
45
|
+
t.preventDefault(), C.submit().then((t) => {
|
|
45
46
|
t !== void 0 && e.onSuccess && e.onSuccess(t);
|
|
46
47
|
});
|
|
47
48
|
};
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
binding:
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
value:
|
|
52
|
-
children: /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ g(c, {
|
|
50
|
+
binding: C,
|
|
51
|
+
children: /* @__PURE__ */ g(v.Provider, {
|
|
52
|
+
value: T,
|
|
53
|
+
children: /* @__PURE__ */ _("form", {
|
|
53
54
|
...e.action === !1 ? {} : {
|
|
54
|
-
action:
|
|
55
|
+
action: l(e.mutation),
|
|
55
56
|
method: "post"
|
|
56
57
|
},
|
|
57
|
-
onSubmit:
|
|
58
|
+
onSubmit: E,
|
|
58
59
|
noValidate: !0,
|
|
59
60
|
"data-voltro-autoform": e.mutation,
|
|
60
61
|
children: [
|
|
61
|
-
e.action === !1 ? null : /* @__PURE__ */
|
|
62
|
+
e.action === !1 ? null : /* @__PURE__ */ _(h, { children: [
|
|
63
|
+
/* @__PURE__ */ g("input", {
|
|
64
|
+
type: "hidden",
|
|
65
|
+
name: a,
|
|
66
|
+
value: t
|
|
67
|
+
}),
|
|
68
|
+
y === void 0 ? null : /* @__PURE__ */ g("input", {
|
|
69
|
+
type: "hidden",
|
|
70
|
+
name: i,
|
|
71
|
+
value: y
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ g("input", {
|
|
74
|
+
type: "hidden",
|
|
75
|
+
name: s,
|
|
76
|
+
value: S
|
|
77
|
+
})
|
|
78
|
+
] }),
|
|
79
|
+
e.action === !1 || e.redirectTo === void 0 ? null : /* @__PURE__ */ g("input", {
|
|
62
80
|
type: "hidden",
|
|
63
|
-
name:
|
|
64
|
-
value: t
|
|
65
|
-
}),
|
|
66
|
-
e.action === !1 || e.redirectTo === void 0 ? null : /* @__PURE__ */ d("input", {
|
|
67
|
-
type: "hidden",
|
|
68
|
-
name: a,
|
|
81
|
+
name: o,
|
|
69
82
|
value: e.redirectTo
|
|
70
83
|
}),
|
|
71
|
-
e.children ? e.children(
|
|
84
|
+
e.children ? e.children(C) : u(C.fields).map((e, t) => e.name === void 0 ? e.fields.map((e) => /* @__PURE__ */ g(x, { name: e.name }, e.name)) : /* @__PURE__ */ _("fieldset", {
|
|
72
85
|
"data-voltro-section": e.name,
|
|
73
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ g("legend", { children: e.label ?? e.name }), e.fields.map((e) => /* @__PURE__ */ g(x, { name: e.name }, e.name))]
|
|
74
87
|
}, e.name)),
|
|
75
|
-
|
|
88
|
+
C.formError === void 0 ? null : /* @__PURE__ */ g("p", {
|
|
76
89
|
role: "alert",
|
|
77
90
|
"data-voltro-form-error": "",
|
|
78
|
-
children:
|
|
91
|
+
children: C.formError
|
|
79
92
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ g("button", {
|
|
81
94
|
type: "submit",
|
|
82
|
-
disabled:
|
|
95
|
+
disabled: C.pending,
|
|
83
96
|
children: e.submitLabel ?? "Submit"
|
|
84
97
|
})
|
|
85
98
|
]
|
|
@@ -88,4 +101,4 @@ function _(e) {
|
|
|
88
101
|
});
|
|
89
102
|
}
|
|
90
103
|
//#endregion
|
|
91
|
-
export {
|
|
104
|
+
export { S as AutoForm, x as Field };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,21 @@ import { UseDataTableOptions } from '@voltro/client';
|
|
|
13
13
|
import { WidgetKind } from '@voltro/client';
|
|
14
14
|
import { WorkflowRunStatus } from '@voltro/client';
|
|
15
15
|
|
|
16
|
+
export declare interface AchievementUiStrings {
|
|
17
|
+
readonly title: string;
|
|
18
|
+
readonly loading: string;
|
|
19
|
+
readonly empty: string;
|
|
20
|
+
readonly unavailable: string;
|
|
21
|
+
readonly invalid: string;
|
|
22
|
+
readonly locked: string;
|
|
23
|
+
readonly unlocked: string;
|
|
24
|
+
readonly tier: (id: string) => string;
|
|
25
|
+
readonly progress: (stat: string, value: string, target: string) => string;
|
|
26
|
+
readonly unlockedDate: (date: string) => string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare const achievementUiStrings: Readonly<Record<'en' | 'de', AchievementUiStrings>>;
|
|
30
|
+
|
|
16
31
|
/** Kit-styled default chat surface. Streaming bubbles, the live typewriter
|
|
17
32
|
* row, an input box wired to `<agent>.send`. */
|
|
18
33
|
export declare function AgentChat(props: AgentChatProps): ReactNode;
|
|
@@ -327,6 +342,27 @@ export declare interface QueryFiltersProps<Row> {
|
|
|
327
342
|
readonly children?: (state: QueryFiltersState<Row>) => ReactNode;
|
|
328
343
|
}
|
|
329
344
|
|
|
345
|
+
export declare interface QuestUiStrings {
|
|
346
|
+
readonly title: string;
|
|
347
|
+
readonly loading: string;
|
|
348
|
+
readonly empty: string;
|
|
349
|
+
readonly unavailable: string;
|
|
350
|
+
readonly active: string;
|
|
351
|
+
readonly completed: string;
|
|
352
|
+
readonly expired: string;
|
|
353
|
+
readonly reroll: string;
|
|
354
|
+
readonly rerollPending: string;
|
|
355
|
+
readonly recover: string;
|
|
356
|
+
readonly recoverPending: string;
|
|
357
|
+
readonly rerollError: string;
|
|
358
|
+
readonly invalid: string;
|
|
359
|
+
readonly objective: (name: string, progress: number, target: number) => string;
|
|
360
|
+
readonly expires: (date: string) => string;
|
|
361
|
+
readonly remaining: (count: number) => string;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export declare const questUiStrings: Readonly<Record<'en' | 'de', QuestUiStrings>>;
|
|
365
|
+
|
|
330
366
|
export declare function RecordView<R extends Record<string, unknown> = Record<string, unknown>>(props: RecordViewProps<R>): ReactNode;
|
|
331
367
|
|
|
332
368
|
export declare interface RecordViewProps<R extends Record<string, unknown>> {
|
|
@@ -397,6 +433,8 @@ export declare interface TableSkeletonProps {
|
|
|
397
433
|
* that interpolates a value (count, name, label) is a function so a locale can
|
|
398
434
|
* reorder/pluralize. English defaults live in {@link defaultUiStrings}. */
|
|
399
435
|
export declare interface UiStrings {
|
|
436
|
+
readonly achievements: AchievementUiStrings;
|
|
437
|
+
readonly quests: QuestUiStrings;
|
|
400
438
|
/** <QueryFilters> — the reset button, the "Any <label>" option, the result
|
|
401
439
|
* count, and the group's aria-label. */
|
|
402
440
|
readonly filters: {
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { RichTextView as e, RichTextWidget as t } from "./richText.js";
|
|
2
2
|
import { WidgetRegistryProvider as n, defaultWidgets as r, useWidget as i } from "./widgets.js";
|
|
3
3
|
import { AutoForm as a, Field as o } from "./autoForm.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
4
|
+
import { achievementUiStrings as s } from "./achievementStrings.js";
|
|
5
|
+
import { questUiStrings as c } from "./questStrings.js";
|
|
6
|
+
import { UiStringsProvider as l, defaultUiStrings as u, useUiStrings as d } from "./strings.js";
|
|
7
|
+
import { AsyncSelect as f } from "./asyncSelect.js";
|
|
8
|
+
import { DataTable as p } from "./dataTable.js";
|
|
9
|
+
import { ApprovalControls as m, WorkflowProgress as h, WorkflowStatusBadge as g } from "./workflow.js";
|
|
10
|
+
import { EditingIndicator as _, PresenceAvatars as v, initials as y, summarizeEditors as b } from "./presence.js";
|
|
11
|
+
import { AgentChat as x, AgentMessageView as S, AgentPartView as C, AgentStream as w } from "./agentChat.js";
|
|
12
|
+
import { AppAgent as T } from "./appAgent.js";
|
|
13
|
+
import { DataCopilot as E, DataCopilotAnswer as D, DataCopilotStream as O } from "./dataCopilot.js";
|
|
14
|
+
import { FormSkeleton as k, TableSkeleton as A } from "./skeleton.js";
|
|
15
|
+
import { QueryFilters as j } from "./filters.js";
|
|
16
|
+
import { RecordView as M } from "./recordView.js";
|
|
17
|
+
import { ConnectAccount as N, ConnectAccountFor as P } from "./connectAccount.js";
|
|
18
|
+
import { CommentsThread as F } from "./commentsThread.js";
|
|
19
|
+
export { x as AgentChat, S as AgentMessageView, C as AgentPartView, w as AgentStream, T as AppAgent, m as ApprovalControls, f as AsyncSelect, a as AutoForm, F as CommentsThread, N as ConnectAccount, P as ConnectAccountFor, E as DataCopilot, D as DataCopilotAnswer, O as DataCopilotStream, p as DataTable, _ as EditingIndicator, o as Field, k as FormSkeleton, v as PresenceAvatars, j as QueryFilters, M as RecordView, e as RichTextView, t as RichTextWidget, A as TableSkeleton, l as UiStringsProvider, n as WidgetRegistryProvider, h as WorkflowProgress, g as WorkflowStatusBadge, s as achievementUiStrings, u as defaultUiStrings, r as defaultWidgets, y as initials, c as questUiStrings, b as summarizeEditors, d as useUiStrings, i as useWidget };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/questStrings.ts
|
|
2
|
+
var e = {
|
|
3
|
+
en: {
|
|
4
|
+
title: "Quests",
|
|
5
|
+
loading: "Loading quests…",
|
|
6
|
+
empty: "No current quests.",
|
|
7
|
+
unavailable: "Quests could not be loaded. Reconnect to try again.",
|
|
8
|
+
active: "In progress",
|
|
9
|
+
completed: "Completed",
|
|
10
|
+
expired: "Expired",
|
|
11
|
+
reroll: "Reroll quest",
|
|
12
|
+
rerollPending: "Rerolling…",
|
|
13
|
+
recover: "Check previous reroll",
|
|
14
|
+
recoverPending: "Checking previous reroll…",
|
|
15
|
+
rerollError: "The reroll outcome is unconfirmed. Retry to check the same request.",
|
|
16
|
+
invalid: "Quest data is invalid. Reconnect to request it again.",
|
|
17
|
+
objective: (e, t, n) => `${e}: ${t} of ${n}`,
|
|
18
|
+
expires: (e) => `Ends ${e}`,
|
|
19
|
+
remaining: (e) => `${e} rerolls remaining`
|
|
20
|
+
},
|
|
21
|
+
de: {
|
|
22
|
+
title: "Quests",
|
|
23
|
+
loading: "Quests werden geladen…",
|
|
24
|
+
empty: "Keine aktuellen Quests.",
|
|
25
|
+
unavailable: "Quests konnten nicht geladen werden. Erneut verbinden und wieder versuchen.",
|
|
26
|
+
active: "In Arbeit",
|
|
27
|
+
completed: "Abgeschlossen",
|
|
28
|
+
expired: "Abgelaufen",
|
|
29
|
+
reroll: "Quest neu auslosen",
|
|
30
|
+
rerollPending: "Quest wird ausgelost…",
|
|
31
|
+
recover: "Vorherige Auslosung prüfen",
|
|
32
|
+
recoverPending: "Vorherige Auslosung wird geprüft…",
|
|
33
|
+
rerollError: "Das Ergebnis ist unbestätigt. Erneut versuchen prüft dieselbe Anfrage.",
|
|
34
|
+
invalid: "Die Quest-Daten sind ungültig. Erneut verbinden fordert sie neu an.",
|
|
35
|
+
objective: (e, t, n) => `${e}: ${t} von ${n}`,
|
|
36
|
+
expires: (e) => `Endet ${e}`,
|
|
37
|
+
remaining: (e) => `${e} Auslosungen verbleiben`
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { e as questUiStrings };
|
package/dist/strings.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { achievementUiStrings as e } from "./achievementStrings.js";
|
|
2
|
+
import { questUiStrings as t } from "./questStrings.js";
|
|
3
|
+
import { createContext as n, useContext as r, useMemo as i } from "react";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
5
|
//#region src/strings.tsx
|
|
4
|
-
var
|
|
6
|
+
var o = {
|
|
7
|
+
achievements: e.en,
|
|
8
|
+
quests: t.en,
|
|
5
9
|
filters: {
|
|
6
10
|
clear: "Clear",
|
|
7
11
|
filtersLabel: "Filters",
|
|
@@ -78,7 +82,15 @@ var i = {
|
|
|
78
82
|
howToGetToken: "How do I get a token?",
|
|
79
83
|
loading: "Loading…"
|
|
80
84
|
}
|
|
81
|
-
},
|
|
85
|
+
}, s = n(o), c = (e, t) => ({
|
|
86
|
+
achievements: {
|
|
87
|
+
...e.achievements,
|
|
88
|
+
...t.achievements
|
|
89
|
+
},
|
|
90
|
+
quests: {
|
|
91
|
+
...e.quests,
|
|
92
|
+
...t.quests
|
|
93
|
+
},
|
|
82
94
|
filters: {
|
|
83
95
|
...e.filters,
|
|
84
96
|
...t.filters
|
|
@@ -124,13 +136,13 @@ var i = {
|
|
|
124
136
|
...t.connectAccount
|
|
125
137
|
}
|
|
126
138
|
});
|
|
127
|
-
function
|
|
128
|
-
let
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
value:
|
|
139
|
+
function l(e) {
|
|
140
|
+
let t = r(s), n = i(() => c(t, e.strings), [t, e.strings]);
|
|
141
|
+
return /* @__PURE__ */ a(s.Provider, {
|
|
142
|
+
value: n,
|
|
131
143
|
children: e.children
|
|
132
144
|
});
|
|
133
145
|
}
|
|
134
|
-
var
|
|
146
|
+
var u = () => r(s);
|
|
135
147
|
//#endregion
|
|
136
|
-
export {
|
|
148
|
+
export { l as UiStringsProvider, o as defaultUiStrings, u as useUiStrings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.87.0",
|
|
4
4
|
"description": "Schema-driven React components over Voltro's headless client bindings: AutoForm, DataTable, the widget seam, and live workflow/presence/AI surfaces.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"node": ">=24.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@voltro/client": "0.
|
|
37
|
-
"@voltro/plugin-comments": "0.
|
|
36
|
+
"@voltro/client": "0.87.0",
|
|
37
|
+
"@voltro/plugin-comments": "0.87.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"effect": "4.0.1",
|