@ateam-ai-mobile/core 0.1.35 → 0.1.38
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.d.mts +150 -14
- package/dist/index.d.ts +150 -14
- package/dist/index.js +211 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +190 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/acs/api.ts +46 -0
- package/src/chat/blockText.ts +238 -32
- package/src/index.ts +34 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
CHART_BLOCK_CLOSE: () => CHART_BLOCK_CLOSE,
|
|
24
|
+
CHART_BLOCK_OPEN: () => CHART_BLOCK_OPEN,
|
|
25
|
+
COMPARISON_BLOCK_CLOSE: () => COMPARISON_BLOCK_CLOSE,
|
|
26
|
+
COMPARISON_BLOCK_OPEN: () => COMPARISON_BLOCK_OPEN,
|
|
23
27
|
DETAILS_BLOCK_CLOSE: () => DETAILS_BLOCK_CLOSE,
|
|
24
28
|
DETAILS_BLOCK_OPEN: () => DETAILS_BLOCK_OPEN,
|
|
25
29
|
DIAGRAM_BLOCK_CLOSE: () => DIAGRAM_BLOCK_CLOSE,
|
|
@@ -30,14 +34,22 @@ __export(index_exports, {
|
|
|
30
34
|
PluginCommandEmitter: () => PluginCommandEmitter,
|
|
31
35
|
TABLE_BLOCK_CLOSE: () => TABLE_BLOCK_CLOSE,
|
|
32
36
|
TABLE_BLOCK_OPEN: () => TABLE_BLOCK_OPEN,
|
|
37
|
+
TIMELINE_BLOCK_CLOSE: () => TIMELINE_BLOCK_CLOSE,
|
|
38
|
+
TIMELINE_BLOCK_OPEN: () => TIMELINE_BLOCK_OPEN,
|
|
39
|
+
VISUALS: () => VISUALS,
|
|
33
40
|
ada: () => ada,
|
|
34
41
|
apiFetch: () => apiFetch,
|
|
35
42
|
apiFetchRaw: () => apiFetchRaw,
|
|
36
43
|
blocksToText: () => blocksToText,
|
|
37
44
|
borderRadius: () => borderRadius,
|
|
38
45
|
capabilityEnabled: () => capabilityEnabled,
|
|
46
|
+
chartAsText: () => chartAsText,
|
|
47
|
+
chartScale: () => chartScale,
|
|
48
|
+
chartView: () => chartView,
|
|
39
49
|
closeChatStream: () => closeChatStream,
|
|
40
50
|
colors: () => colors,
|
|
51
|
+
comparisonAsText: () => comparisonAsText,
|
|
52
|
+
comparisonView: () => comparisonView,
|
|
41
53
|
connectAcsWs: () => connectAcsWs,
|
|
42
54
|
connectorCall: () => connectorCall,
|
|
43
55
|
createAuthSession: () => createAuthSession,
|
|
@@ -45,10 +57,12 @@ __export(index_exports, {
|
|
|
45
57
|
deleteArtifact: () => deleteArtifact,
|
|
46
58
|
devModeFromCatalog: () => devModeFromCatalog,
|
|
47
59
|
diagramAsText: () => diagramAsText,
|
|
60
|
+
diagramFlow: () => diagramFlow,
|
|
48
61
|
diagramView: () => diagramView,
|
|
49
62
|
disconnectAcsWs: () => disconnectAcsWs,
|
|
50
63
|
exchangeHandoff: () => exchangeHandoff,
|
|
51
64
|
fetchConsumerConfig: () => fetchConsumerConfig,
|
|
65
|
+
fetchLauncherPlaces: () => fetchLauncherPlaces,
|
|
52
66
|
focusPlugin: () => focusPlugin,
|
|
53
67
|
fontSize: () => fontSize,
|
|
54
68
|
getConfig: () => getConfig,
|
|
@@ -65,6 +79,7 @@ __export(index_exports, {
|
|
|
65
79
|
initAdas: () => initAdas,
|
|
66
80
|
isAdasInitialized: () => isAdasInitialized,
|
|
67
81
|
isDevHost: () => isDevHost,
|
|
82
|
+
isVisualKind: () => isVisualKind,
|
|
68
83
|
joinWithApple: () => joinWithApple,
|
|
69
84
|
joinWithGoogle: () => joinWithGoogle,
|
|
70
85
|
linkChannelStart: () => linkChannelStart,
|
|
@@ -79,6 +94,7 @@ __export(index_exports, {
|
|
|
79
94
|
nestByMaster: () => nestByMaster,
|
|
80
95
|
notifyAcsWsForeground: () => notifyAcsWsForeground,
|
|
81
96
|
notifyAppForeground: () => notifyAppForeground,
|
|
97
|
+
numText: () => numText,
|
|
82
98
|
onAppForeground: () => onAppForeground,
|
|
83
99
|
openJoinWithApple: () => openJoinWithApple,
|
|
84
100
|
openJoinWithGoogle: () => openJoinWithGoogle,
|
|
@@ -95,6 +111,7 @@ __export(index_exports, {
|
|
|
95
111
|
readDevMode: () => readDevMode,
|
|
96
112
|
recentNotifDispatches: () => recentDispatches,
|
|
97
113
|
recordEvent: () => recordEvent,
|
|
114
|
+
recordWidgetOpen: () => recordWidgetOpen,
|
|
98
115
|
refreshToken: () => refreshToken,
|
|
99
116
|
registerHostIntent: () => registerHostIntent,
|
|
100
117
|
registerPushDevice: () => registerDevice,
|
|
@@ -112,6 +129,8 @@ __export(index_exports, {
|
|
|
112
129
|
splitBlockSegments: () => splitBlockSegments,
|
|
113
130
|
switchTenant: () => switchTenant,
|
|
114
131
|
tenantFromToken: () => tenantFromToken,
|
|
132
|
+
timelineAsText: () => timelineAsText,
|
|
133
|
+
timelineView: () => timelineView,
|
|
115
134
|
unlinkNotifChannel: () => unlinkChannel,
|
|
116
135
|
unregisterPushDevice: () => unregisterDevice,
|
|
117
136
|
unwrapMcpResult: () => unwrapMcpResult,
|
|
@@ -120,7 +139,8 @@ __export(index_exports, {
|
|
|
120
139
|
useHomeActionsStore: () => useHomeActionsStore,
|
|
121
140
|
useWidgetsStore: () => useWidgetsStore,
|
|
122
141
|
useWorkspaceStore: () => useWorkspaceStore,
|
|
123
|
-
userFromJwt: () => userFromJwt
|
|
142
|
+
userFromJwt: () => userFromJwt,
|
|
143
|
+
visualViewOf: () => visualViewOf
|
|
124
144
|
});
|
|
125
145
|
module.exports = __toCommonJS(index_exports);
|
|
126
146
|
|
|
@@ -747,6 +767,26 @@ async function recordEvent(artifactId, event, surface) {
|
|
|
747
767
|
} catch {
|
|
748
768
|
}
|
|
749
769
|
}
|
|
770
|
+
async function fetchLauncherPlaces() {
|
|
771
|
+
try {
|
|
772
|
+
const res = await authedFetch("/api/acs/launcher", { method: "GET" });
|
|
773
|
+
if (!res.ok) return null;
|
|
774
|
+
const data = await res.json();
|
|
775
|
+
if (!data?.ok) return null;
|
|
776
|
+
return {
|
|
777
|
+
mine: Array.isArray(data.mine) ? data.mine : [],
|
|
778
|
+
resting: Array.isArray(data.resting) ? data.resting : [],
|
|
779
|
+
hidden: Array.isArray(data.hidden) ? data.hidden : []
|
|
780
|
+
};
|
|
781
|
+
} catch (e) {
|
|
782
|
+
console.warn("[acs] /launcher failed:", e?.message || e);
|
|
783
|
+
return null;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
function recordWidgetOpen(pluginId, surface) {
|
|
787
|
+
if (typeof pluginId !== "string" || !pluginId.startsWith("acs:")) return;
|
|
788
|
+
void recordEvent(pluginId.slice(4), "clicked", surface);
|
|
789
|
+
}
|
|
750
790
|
async function listHomeActions() {
|
|
751
791
|
try {
|
|
752
792
|
const res = await authedFetch("/api/acs/home-actions", { method: "GET" });
|
|
@@ -1046,10 +1086,10 @@ function backoffMs(attempt) {
|
|
|
1046
1086
|
const jitter = Math.random() * 250;
|
|
1047
1087
|
return base + jitter;
|
|
1048
1088
|
}
|
|
1049
|
-
function send(
|
|
1089
|
+
function send(obj2) {
|
|
1050
1090
|
if (_ws && _ws.readyState === 1) {
|
|
1051
1091
|
try {
|
|
1052
|
-
_ws.send(JSON.stringify(
|
|
1092
|
+
_ws.send(JSON.stringify(obj2));
|
|
1053
1093
|
} catch (e) {
|
|
1054
1094
|
console.warn("[acsWs] send failed", e);
|
|
1055
1095
|
}
|
|
@@ -1580,7 +1620,13 @@ var DETAILS_BLOCK_OPEN = "\uE102";
|
|
|
1580
1620
|
var DETAILS_BLOCK_CLOSE = "\uE103";
|
|
1581
1621
|
var DIAGRAM_BLOCK_OPEN = "\uE104";
|
|
1582
1622
|
var DIAGRAM_BLOCK_CLOSE = "\uE105";
|
|
1583
|
-
var
|
|
1623
|
+
var CHART_BLOCK_OPEN = "\uE106";
|
|
1624
|
+
var CHART_BLOCK_CLOSE = "\uE107";
|
|
1625
|
+
var COMPARISON_BLOCK_OPEN = "\uE108";
|
|
1626
|
+
var COMPARISON_BLOCK_CLOSE = "\uE109";
|
|
1627
|
+
var TIMELINE_BLOCK_OPEN = "\uE10A";
|
|
1628
|
+
var TIMELINE_BLOCK_CLOSE = "\uE10B";
|
|
1629
|
+
var SENTINEL_CHARS = /[\uE100-\uE10B]/g;
|
|
1584
1630
|
var clean = (text) => text.replace(SENTINEL_CHARS, "");
|
|
1585
1631
|
function renderTableShape(content) {
|
|
1586
1632
|
if (!content || typeof content !== "object") return null;
|
|
@@ -1596,28 +1642,152 @@ var statusOf = (v) => DIAGRAM_STATUSES.includes(v) ? v : "";
|
|
|
1596
1642
|
function diagramView(content) {
|
|
1597
1643
|
if (!content || typeof content !== "object" || !Array.isArray(content.steps)) return null;
|
|
1598
1644
|
const steps = [];
|
|
1599
|
-
|
|
1600
|
-
|
|
1645
|
+
const kept = [];
|
|
1646
|
+
const rawNext = [];
|
|
1647
|
+
content.steps.forEach((s, i) => {
|
|
1648
|
+
kept[i + 1] = 0;
|
|
1649
|
+
if (!s || typeof s !== "object") return;
|
|
1601
1650
|
const title = str(s.title);
|
|
1602
1651
|
const text = str(s.text);
|
|
1603
|
-
if (!title && !text)
|
|
1652
|
+
if (!title && !text) return;
|
|
1604
1653
|
const badges = [];
|
|
1605
1654
|
for (const b of Array.isArray(s.badges) ? s.badges : []) {
|
|
1606
1655
|
const bt = str(b && typeof b === "object" ? b.text : b);
|
|
1607
1656
|
if (bt) badges.push({ text: bt, status: statusOf(b && b.status) });
|
|
1608
1657
|
}
|
|
1609
|
-
steps.push({ title: title || text, text: title ? text : "", status: statusOf(s.status), badges });
|
|
1610
|
-
|
|
1611
|
-
|
|
1658
|
+
steps.push({ title: title || text, text: title ? text : "", status: statusOf(s.status), badges, decision: s.kind === "decision" || s.decision === true, next: null });
|
|
1659
|
+
rawNext.push(Array.isArray(s.next) ? s.next : null);
|
|
1660
|
+
kept[i + 1] = steps.length;
|
|
1661
|
+
});
|
|
1662
|
+
if (steps.length < 2) return null;
|
|
1663
|
+
steps.forEach((st, i) => {
|
|
1664
|
+
const raw = rawNext[i];
|
|
1665
|
+
if (!raw) return;
|
|
1666
|
+
const out = [];
|
|
1667
|
+
for (const e of raw) {
|
|
1668
|
+
const to = e && typeof e === "object" && Number.isInteger(e.to) ? kept[e.to] || 0 : 0;
|
|
1669
|
+
if (!to || to === i + 1 || out.some((x) => x.to === to) || out.length >= 3) continue;
|
|
1670
|
+
out.push({ to, label: str(e.label).slice(0, 40) });
|
|
1671
|
+
}
|
|
1672
|
+
st.next = out;
|
|
1673
|
+
});
|
|
1674
|
+
return { title: str(content.title), steps };
|
|
1675
|
+
}
|
|
1676
|
+
function diagramFlow(view) {
|
|
1677
|
+
const last = view.steps.length - 1;
|
|
1678
|
+
return view.steps.map((st, i) => {
|
|
1679
|
+
const flow = { arrow: null, jumps: [], loops: [] };
|
|
1680
|
+
if (!st.next) {
|
|
1681
|
+
if (i < last) flow.arrow = { label: "" };
|
|
1682
|
+
return flow;
|
|
1683
|
+
}
|
|
1684
|
+
for (const e of st.next) {
|
|
1685
|
+
if (e.to === i + 2) flow.arrow = { label: e.label };
|
|
1686
|
+
else if (e.to > i + 2) flow.jumps.push(e);
|
|
1687
|
+
else flow.loops.push(e);
|
|
1688
|
+
}
|
|
1689
|
+
return flow;
|
|
1690
|
+
});
|
|
1612
1691
|
}
|
|
1613
1692
|
function diagramAsText(d) {
|
|
1614
1693
|
const lines = d.title ? [d.title] : [];
|
|
1615
1694
|
d.steps.forEach((s, i) => {
|
|
1616
1695
|
const badges = s.badges.length ? ` [${s.badges.map((b) => b.text).join(", ")}]` : "";
|
|
1617
|
-
lines.push(`${i + 1}. ${s.title}${s.text ? ` \u2014 ${s.text}` : ""}${badges}`);
|
|
1696
|
+
lines.push(`${i + 1}. ${s.title}${s.decision ? " (decision)" : ""}${s.text ? ` \u2014 ${s.text}` : ""}${badges}`);
|
|
1697
|
+
if (s.next) lines.push(s.next.length ? ` ${s.next.map((e) => `${e.label ? `${e.label} ` : ""}\u2192 ${e.to}`).join("; ")}` : " (end)");
|
|
1618
1698
|
});
|
|
1619
1699
|
return lines.join("\n");
|
|
1620
1700
|
}
|
|
1701
|
+
var num = (v) => typeof v === "number" && Number.isFinite(v) && Math.abs(v) <= 1e15 ? v : null;
|
|
1702
|
+
var list = (v) => Array.isArray(v) ? v : [];
|
|
1703
|
+
var obj = (v) => v && typeof v === "object" && !Array.isArray(v) ? v : {};
|
|
1704
|
+
var numText = (n) => String(Math.round(n * 100) / 100);
|
|
1705
|
+
function chartView(content) {
|
|
1706
|
+
const c = obj(content);
|
|
1707
|
+
const labels = list(c.labels).map(str);
|
|
1708
|
+
if (labels.length < 2) return null;
|
|
1709
|
+
const series = [];
|
|
1710
|
+
for (const s of list(c.series)) {
|
|
1711
|
+
const values = list(obj(s).values).slice(0, labels.length).map(num);
|
|
1712
|
+
if (values.length === labels.length && values.every((v) => v !== null)) series.push({ name: str(obj(s).name), values });
|
|
1713
|
+
}
|
|
1714
|
+
if (!series.length) return null;
|
|
1715
|
+
const highlight = str(c.highlight);
|
|
1716
|
+
return { title: str(c.title), type: c.type === "line" ? "line" : "bar", labels, series, unit: str(c.unit), highlight: labels.includes(highlight) ? highlight : "" };
|
|
1717
|
+
}
|
|
1718
|
+
function chartScale(view) {
|
|
1719
|
+
const all = view.series.flatMap((s) => s.values);
|
|
1720
|
+
const lo = Math.min(0, ...all);
|
|
1721
|
+
const hi = Math.max(0, ...all);
|
|
1722
|
+
return { lo, hi: hi === lo ? lo + 1 : hi };
|
|
1723
|
+
}
|
|
1724
|
+
function chartAsText(view) {
|
|
1725
|
+
const u = view.unit ? ` ${view.unit}` : "";
|
|
1726
|
+
const lines = view.title ? [view.title] : [];
|
|
1727
|
+
view.labels.forEach((l, i) => {
|
|
1728
|
+
const cells = view.series.map((s) => `${s.name ? `${s.name} ` : ""}${numText(s.values[i])}${u}`);
|
|
1729
|
+
lines.push(`${l}: ${cells.join(", ")}${view.highlight === l ? " (highlighted)" : ""}`);
|
|
1730
|
+
});
|
|
1731
|
+
return lines.join("\n");
|
|
1732
|
+
}
|
|
1733
|
+
function comparisonView(content) {
|
|
1734
|
+
const c = obj(content);
|
|
1735
|
+
const options = [];
|
|
1736
|
+
for (const o of list(c.options)) {
|
|
1737
|
+
const ob = obj(o);
|
|
1738
|
+
const name = str(ob.name);
|
|
1739
|
+
if (!name) continue;
|
|
1740
|
+
const rows = list(ob.rows).map((r) => ({ text: str(obj(r).text), ok: typeof obj(r).ok === "boolean" ? obj(r).ok : null })).filter((r) => r.text);
|
|
1741
|
+
options.push({ name, price: str(ob.price), badge: str(ob.badge), best: ob.best === true, rows });
|
|
1742
|
+
}
|
|
1743
|
+
if (options.length < 2) return null;
|
|
1744
|
+
const first = options.findIndex((o) => o.best);
|
|
1745
|
+
options.forEach((o, i) => {
|
|
1746
|
+
if (i !== first) o.best = false;
|
|
1747
|
+
});
|
|
1748
|
+
return { title: str(c.title), options: options.slice(0, 3) };
|
|
1749
|
+
}
|
|
1750
|
+
function comparisonAsText(view) {
|
|
1751
|
+
const lines = view.title ? [view.title] : [];
|
|
1752
|
+
for (const o of view.options) {
|
|
1753
|
+
lines.push(`${o.name}${o.price ? ` (${o.price})` : ""}${o.badge ? ` [${o.badge}]` : ""}${o.best ? " (best)" : ""}`);
|
|
1754
|
+
for (const r of o.rows) lines.push(` ${r.ok === true ? "+" : r.ok === false ? "-" : "\xB7"} ${r.text}`);
|
|
1755
|
+
}
|
|
1756
|
+
return lines.join("\n");
|
|
1757
|
+
}
|
|
1758
|
+
function timelineView(content) {
|
|
1759
|
+
const c = obj(content);
|
|
1760
|
+
const days = list(c.days).map((d) => ({
|
|
1761
|
+
title: str(obj(d).title),
|
|
1762
|
+
events: list(obj(d).events).map((e) => ({ time: str(obj(e).time), text: str(obj(e).text) })).filter((e) => e.text)
|
|
1763
|
+
})).filter((d) => d.title || d.events.length);
|
|
1764
|
+
if (days.reduce((n, d) => n + d.events.length, 0) < 2) return null;
|
|
1765
|
+
return { title: str(c.title), subtitle: str(c.subtitle), days };
|
|
1766
|
+
}
|
|
1767
|
+
function timelineAsText(view) {
|
|
1768
|
+
const lines = [];
|
|
1769
|
+
if (view.title) lines.push(view.title);
|
|
1770
|
+
if (view.subtitle) lines.push(view.subtitle);
|
|
1771
|
+
for (const d of view.days) {
|
|
1772
|
+
if (d.title) lines.push(d.title);
|
|
1773
|
+
for (const e of d.events) lines.push(` ${e.time ? `${e.time} ` : ""}${e.text}`);
|
|
1774
|
+
}
|
|
1775
|
+
return lines.join("\n");
|
|
1776
|
+
}
|
|
1777
|
+
var VISUALS = {
|
|
1778
|
+
diagram: { open: DIAGRAM_BLOCK_OPEN, close: DIAGRAM_BLOCK_CLOSE, view: diagramView, asText: diagramAsText },
|
|
1779
|
+
chart: { open: CHART_BLOCK_OPEN, close: CHART_BLOCK_CLOSE, view: chartView, asText: chartAsText },
|
|
1780
|
+
comparison: { open: COMPARISON_BLOCK_OPEN, close: COMPARISON_BLOCK_CLOSE, view: comparisonView, asText: comparisonAsText },
|
|
1781
|
+
timeline: { open: TIMELINE_BLOCK_OPEN, close: TIMELINE_BLOCK_CLOSE, view: timelineView, asText: timelineAsText }
|
|
1782
|
+
};
|
|
1783
|
+
var isVisualKind = (kind) => typeof kind === "string" && Object.prototype.hasOwnProperty.call(VISUALS, kind);
|
|
1784
|
+
function visualViewOf(kind, payload) {
|
|
1785
|
+
try {
|
|
1786
|
+
return VISUALS[kind].view(JSON.parse(decodeURIComponent(payload)));
|
|
1787
|
+
} catch {
|
|
1788
|
+
return null;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1621
1791
|
function fence(code, language) {
|
|
1622
1792
|
const longest = (code.match(/`+/g) || []).reduce((n, run) => Math.max(n, run.length), 0);
|
|
1623
1793
|
const ticks = "`".repeat(Math.max(3, longest + 1));
|
|
@@ -1640,9 +1810,10 @@ function blockText(b) {
|
|
|
1640
1810
|
const md = renderTableShape(b.content);
|
|
1641
1811
|
if (md) return md;
|
|
1642
1812
|
}
|
|
1643
|
-
if (b.kind
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1813
|
+
if (isVisualKind(b.kind)) {
|
|
1814
|
+
const v = VISUALS[b.kind];
|
|
1815
|
+
const view = v.view(b.content);
|
|
1816
|
+
if (view) return `${v.open}${encodeURIComponent(JSON.stringify(view))}${v.close}`;
|
|
1646
1817
|
}
|
|
1647
1818
|
if (b.kind === "json") {
|
|
1648
1819
|
const md = renderTableShape(b.content);
|
|
@@ -1662,14 +1833,14 @@ function blocksToText(blocks) {
|
|
|
1662
1833
|
if (!b || typeof b !== "object") return "";
|
|
1663
1834
|
const text = blockText(b);
|
|
1664
1835
|
if (!text) return "";
|
|
1665
|
-
if (text.startsWith(TABLE_BLOCK_OPEN) || text.startsWith(
|
|
1836
|
+
if (text.startsWith(TABLE_BLOCK_OPEN) || Object.values(VISUALS).some((v) => text.startsWith(v.open))) return text;
|
|
1666
1837
|
return b.meta?.display === "folded" ? `${DETAILS_BLOCK_OPEN}${encodeURIComponent(text)}${DETAILS_BLOCK_CLOSE}` : text;
|
|
1667
1838
|
}).filter(Boolean).join("\n\n");
|
|
1668
1839
|
}
|
|
1669
1840
|
var PAIRS = [
|
|
1670
1841
|
{ kind: "table", open: TABLE_BLOCK_OPEN, close: TABLE_BLOCK_CLOSE },
|
|
1671
1842
|
{ kind: "details", open: DETAILS_BLOCK_OPEN, close: DETAILS_BLOCK_CLOSE },
|
|
1672
|
-
{ kind
|
|
1843
|
+
...Object.keys(VISUALS).map((kind) => ({ kind, open: VISUALS[kind].open, close: VISUALS[kind].close }))
|
|
1673
1844
|
];
|
|
1674
1845
|
function splitBlockSegments(content) {
|
|
1675
1846
|
const segments = [];
|
|
@@ -1715,13 +1886,9 @@ function plainTextOf(content) {
|
|
|
1715
1886
|
return splitBlockSegments(content).map((seg) => {
|
|
1716
1887
|
if (seg.kind === "md") return seg.content;
|
|
1717
1888
|
if (seg.kind === "table") return tableAsText(seg.content);
|
|
1718
|
-
if (seg.kind
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
return view ? diagramAsText(view) : "";
|
|
1722
|
-
} catch {
|
|
1723
|
-
return "";
|
|
1724
|
-
}
|
|
1889
|
+
if (isVisualKind(seg.kind)) {
|
|
1890
|
+
const view = visualViewOf(seg.kind, seg.content);
|
|
1891
|
+
return view ? VISUALS[seg.kind].asText(view) : "";
|
|
1725
1892
|
}
|
|
1726
1893
|
try {
|
|
1727
1894
|
return decodeURIComponent(seg.content);
|
|
@@ -2577,6 +2744,10 @@ var borderRadius = {
|
|
|
2577
2744
|
};
|
|
2578
2745
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2579
2746
|
0 && (module.exports = {
|
|
2747
|
+
CHART_BLOCK_CLOSE,
|
|
2748
|
+
CHART_BLOCK_OPEN,
|
|
2749
|
+
COMPARISON_BLOCK_CLOSE,
|
|
2750
|
+
COMPARISON_BLOCK_OPEN,
|
|
2580
2751
|
DETAILS_BLOCK_CLOSE,
|
|
2581
2752
|
DETAILS_BLOCK_OPEN,
|
|
2582
2753
|
DIAGRAM_BLOCK_CLOSE,
|
|
@@ -2587,14 +2758,22 @@ var borderRadius = {
|
|
|
2587
2758
|
PluginCommandEmitter,
|
|
2588
2759
|
TABLE_BLOCK_CLOSE,
|
|
2589
2760
|
TABLE_BLOCK_OPEN,
|
|
2761
|
+
TIMELINE_BLOCK_CLOSE,
|
|
2762
|
+
TIMELINE_BLOCK_OPEN,
|
|
2763
|
+
VISUALS,
|
|
2590
2764
|
ada,
|
|
2591
2765
|
apiFetch,
|
|
2592
2766
|
apiFetchRaw,
|
|
2593
2767
|
blocksToText,
|
|
2594
2768
|
borderRadius,
|
|
2595
2769
|
capabilityEnabled,
|
|
2770
|
+
chartAsText,
|
|
2771
|
+
chartScale,
|
|
2772
|
+
chartView,
|
|
2596
2773
|
closeChatStream,
|
|
2597
2774
|
colors,
|
|
2775
|
+
comparisonAsText,
|
|
2776
|
+
comparisonView,
|
|
2598
2777
|
connectAcsWs,
|
|
2599
2778
|
connectorCall,
|
|
2600
2779
|
createAuthSession,
|
|
@@ -2602,10 +2781,12 @@ var borderRadius = {
|
|
|
2602
2781
|
deleteArtifact,
|
|
2603
2782
|
devModeFromCatalog,
|
|
2604
2783
|
diagramAsText,
|
|
2784
|
+
diagramFlow,
|
|
2605
2785
|
diagramView,
|
|
2606
2786
|
disconnectAcsWs,
|
|
2607
2787
|
exchangeHandoff,
|
|
2608
2788
|
fetchConsumerConfig,
|
|
2789
|
+
fetchLauncherPlaces,
|
|
2609
2790
|
focusPlugin,
|
|
2610
2791
|
fontSize,
|
|
2611
2792
|
getConfig,
|
|
@@ -2622,6 +2803,7 @@ var borderRadius = {
|
|
|
2622
2803
|
initAdas,
|
|
2623
2804
|
isAdasInitialized,
|
|
2624
2805
|
isDevHost,
|
|
2806
|
+
isVisualKind,
|
|
2625
2807
|
joinWithApple,
|
|
2626
2808
|
joinWithGoogle,
|
|
2627
2809
|
linkChannelStart,
|
|
@@ -2636,6 +2818,7 @@ var borderRadius = {
|
|
|
2636
2818
|
nestByMaster,
|
|
2637
2819
|
notifyAcsWsForeground,
|
|
2638
2820
|
notifyAppForeground,
|
|
2821
|
+
numText,
|
|
2639
2822
|
onAppForeground,
|
|
2640
2823
|
openJoinWithApple,
|
|
2641
2824
|
openJoinWithGoogle,
|
|
@@ -2652,6 +2835,7 @@ var borderRadius = {
|
|
|
2652
2835
|
readDevMode,
|
|
2653
2836
|
recentNotifDispatches,
|
|
2654
2837
|
recordEvent,
|
|
2838
|
+
recordWidgetOpen,
|
|
2655
2839
|
refreshToken,
|
|
2656
2840
|
registerHostIntent,
|
|
2657
2841
|
registerPushDevice,
|
|
@@ -2669,6 +2853,8 @@ var borderRadius = {
|
|
|
2669
2853
|
splitBlockSegments,
|
|
2670
2854
|
switchTenant,
|
|
2671
2855
|
tenantFromToken,
|
|
2856
|
+
timelineAsText,
|
|
2857
|
+
timelineView,
|
|
2672
2858
|
unlinkNotifChannel,
|
|
2673
2859
|
unregisterPushDevice,
|
|
2674
2860
|
unwrapMcpResult,
|
|
@@ -2677,6 +2863,7 @@ var borderRadius = {
|
|
|
2677
2863
|
useHomeActionsStore,
|
|
2678
2864
|
useWidgetsStore,
|
|
2679
2865
|
useWorkspaceStore,
|
|
2680
|
-
userFromJwt
|
|
2866
|
+
userFromJwt,
|
|
2867
|
+
visualViewOf
|
|
2681
2868
|
});
|
|
2682
2869
|
//# sourceMappingURL=index.js.map
|