@voltro/ui 0.86.0 → 0.88.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/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 { UiStringsProvider as s, defaultUiStrings as c, useUiStrings as l } from "./strings.js";
5
- import { AsyncSelect as u } from "./asyncSelect.js";
6
- import { DataTable as d } from "./dataTable.js";
7
- import { ApprovalControls as f, WorkflowProgress as p, WorkflowStatusBadge as m } from "./workflow.js";
8
- import { EditingIndicator as h, PresenceAvatars as g, initials as _, summarizeEditors as v } from "./presence.js";
9
- import { AgentChat as y, AgentMessageView as b, AgentPartView as x, AgentStream as S } from "./agentChat.js";
10
- import { AppAgent as C } from "./appAgent.js";
11
- import { DataCopilot as w, DataCopilotAnswer as T, DataCopilotStream as E } from "./dataCopilot.js";
12
- import { FormSkeleton as D, TableSkeleton as O } from "./skeleton.js";
13
- import { QueryFilters as k } from "./filters.js";
14
- import { RecordView as A } from "./recordView.js";
15
- import { ConnectAccount as j, ConnectAccountFor as M } from "./connectAccount.js";
16
- import { CommentsThread as N } from "./commentsThread.js";
17
- export { y as AgentChat, b as AgentMessageView, x as AgentPartView, S as AgentStream, C as AppAgent, f as ApprovalControls, u as AsyncSelect, a as AutoForm, N as CommentsThread, j as ConnectAccount, M as ConnectAccountFor, w as DataCopilot, T as DataCopilotAnswer, E as DataCopilotStream, d as DataTable, h as EditingIndicator, o as Field, D as FormSkeleton, g as PresenceAvatars, k as QueryFilters, A as RecordView, e as RichTextView, t as RichTextWidget, O as TableSkeleton, s as UiStringsProvider, n as WidgetRegistryProvider, p as WorkflowProgress, m as WorkflowStatusBadge, c as defaultUiStrings, r as defaultWidgets, _ as initials, v as summarizeEditors, l as useUiStrings, i as useWidget };
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 };
package/dist/presence.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defaultUiStrings as e, useUiStrings as t } from "./strings.js";
2
2
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
- //#region src/presence.tsx
3
+ // src/presence.tsx
4
4
  var i = (e, t) => {
5
5
  let n = e.meta?.[t];
6
6
  return typeof n == "string" ? n : void 0;
@@ -39,5 +39,4 @@ function l(e) {
39
39
  children: c(f.map(u), l, d)
40
40
  });
41
41
  }
42
- //#endregion
43
42
  export { l as EditingIndicator, s as PresenceAvatars, o as initials, c as summarizeEditors };
@@ -0,0 +1,40 @@
1
+ // 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
+ export { e as questUiStrings };
@@ -1,7 +1,7 @@
1
1
  import { useUiStrings as e } from "./strings.js";
2
2
  import { useRecord as t } from "@voltro/client";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- //#region src/recordView.tsx
4
+ // src/recordView.tsx
5
5
  var i = (e) => e.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), a = (e) => Array.isArray(e) && e.every((e) => typeof e == "object" && !!e), o = (e) => e == null ? "—" : typeof e == "boolean" ? e ? "✓" : "✗" : String(e);
6
6
  function s({ name: t, items: a }) {
7
7
  let s = e().recordView;
@@ -48,5 +48,4 @@ function c(e) {
48
48
  }, e))]
49
49
  });
50
50
  }
51
- //#endregion
52
51
  export { c as RecordView };
package/dist/richText.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Fragment as e, useEffect as t, useId as n, useRef as r, useState as i } from "react";
2
2
  import { isRichTextDocument as a, isSafeHref as o, parseRichText as s, serializeRichText as c } from "@voltro/client";
3
3
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
4
- //#region src/richText.tsx
4
+ // src/richText.tsx
5
5
  var f = (t, n) => {
6
6
  let r = t.marks ?? [], i = t.text;
7
7
  return r.includes("code") && (i = /* @__PURE__ */ u("code", { children: i }, n)), r.includes("italic") && (i = /* @__PURE__ */ u("em", { children: i }, n)), r.includes("strike") && (i = /* @__PURE__ */ u("s", { children: i }, n)), r.includes("bold") && (i = /* @__PURE__ */ u("strong", { children: i }, n)), /* @__PURE__ */ u(e, { children: i }, n);
@@ -77,5 +77,4 @@ var f = (t, n) => {
77
77
  ]
78
78
  });
79
79
  };
80
- //#endregion
81
80
  export { h as RichTextView, g as RichTextWidget };
package/dist/skeleton.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { formSections as e, useFormSkeleton as t, useTableSkeleton as n } from "@voltro/client";
2
2
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
- //#region src/skeleton.tsx
3
+ // src/skeleton.tsx
4
4
  var a = ({ w: e }) => /* @__PURE__ */ r("span", {
5
5
  "data-skeleton-bar": !0,
6
6
  style: {
@@ -48,5 +48,4 @@ function s(e) {
48
48
  }, t)) })]
49
49
  });
50
50
  }
51
- //#endregion
52
51
  export { o as FormSkeleton, s as TableSkeleton };
package/dist/strings.js CHANGED
@@ -1,7 +1,11 @@
1
- import { createContext as e, useContext as t, useMemo as n } from "react";
2
- import { jsx as r } from "react/jsx-runtime";
3
- //#region src/strings.tsx
4
- var i = {
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";
5
+ // src/strings.tsx
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
- }, a = e(i), o = (e, t) => ({
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,12 @@ var i = {
124
136
  ...t.connectAccount
125
137
  }
126
138
  });
127
- function s(e) {
128
- let i = t(a), s = n(() => o(i, e.strings), [i, e.strings]);
129
- return /* @__PURE__ */ r(a.Provider, {
130
- value: s,
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 c = () => t(a);
135
- //#endregion
136
- export { s as UiStringsProvider, i as defaultUiStrings, c as useUiStrings };
146
+ var u = () => r(s);
147
+ export { l as UiStringsProvider, o as defaultUiStrings, u as useUiStrings };
package/dist/widgets.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { RichTextWidget as e } from "./richText.js";
2
2
  import { createContext as t, useContext as n, useId as r, useMemo as i } from "react";
3
3
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
- //#region src/widgets.tsx
4
+ // src/widgets.tsx
5
5
  var s = (e) => e == null ? "" : String(e), c = ({ required: e }) => e ? /* @__PURE__ */ a("span", {
6
6
  "aria-hidden": "true",
7
7
  children: " *"
@@ -243,5 +243,4 @@ var s = (e) => e == null ? "" : String(e), c = ({ required: e }) => e ? /* @__PU
243
243
  children: e.children
244
244
  });
245
245
  }, w = (e) => n(S)[e] ?? x[e] ?? x.custom;
246
- //#endregion
247
246
  export { C as WidgetRegistryProvider, x as defaultWidgets, w as useWidget };
package/dist/workflow.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { useUiStrings as e } from "./strings.js";
2
2
  import { useWorkflowRunState as t } from "@voltro/client";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- //#region src/workflow.tsx
4
+ // src/workflow.tsx
5
5
  var i = (e) => e === "succeeded" ? "✓" : e === "failed" ? "✗" : "…";
6
6
  function a(a) {
7
7
  let { api: o, runId: s, loadingText: c, emptyText: l } = a, u = e().workflow, d = t(o, s);
@@ -88,5 +88,4 @@ function s(e) {
88
88
  })]
89
89
  }) : null;
90
90
  }
91
- //#endregion
92
91
  export { s as ApprovalControls, a as WorkflowProgress, o as WorkflowStatusBadge };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/ui",
3
- "version": "0.86.0",
3
+ "version": "0.88.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,11 +33,11 @@
33
33
  "node": ">=24.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@voltro/client": "0.86.0",
37
- "@voltro/plugin-comments": "0.86.0"
36
+ "@voltro/client": "0.88.0",
37
+ "@voltro/plugin-comments": "0.88.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "effect": "4.0.1",
40
+ "effect": "4.1.0",
41
41
  "react": "^19.0.0"
42
42
  },
43
43
  "publishConfig": {