@june-ai/june-ui 0.2.12 → 0.2.13
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/{chunk-6WLZQX6O.cjs → chunk-NMTAZCQD.cjs} +195 -3
- package/dist/{chunk-V2FUMLLN.js → chunk-SZ47R4Z5.js} +196 -4
- package/dist/entry-core.cjs +18 -2
- package/dist/entry-core.d.cts +59 -3
- package/dist/entry-core.d.ts +59 -3
- package/dist/entry-core.js +19 -3
- package/dist/index.cjs +25 -7
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +22 -4
- package/dist/june.css +225 -0
- package/package.json +1 -1
|
@@ -3705,7 +3705,7 @@ var SAVE_LABEL = {
|
|
|
3705
3705
|
error: "Save failed"
|
|
3706
3706
|
};
|
|
3707
3707
|
var ZOOM_STEPS = [0.5, 0.67, 0.75, 0.9, 1, 1.1, 1.25, 1.5, 1.75, 2];
|
|
3708
|
-
var stepZoom = (
|
|
3708
|
+
var stepZoom = (z4, dir) => dir > 0 ? _nullishCoalesce(ZOOM_STEPS.find((s) => s > z4 + 1e-3), () => ( z4)) : _nullishCoalesce([...ZOOM_STEPS].reverse().find((s) => s < z4 - 1e-3), () => ( z4));
|
|
3709
3709
|
function DocumentEditorImpl(props) {
|
|
3710
3710
|
const {
|
|
3711
3711
|
documentId,
|
|
@@ -4445,6 +4445,115 @@ function ToolApproval({
|
|
|
4445
4445
|
);
|
|
4446
4446
|
}
|
|
4447
4447
|
|
|
4448
|
+
// src/features/tool-approval/tool-approval-card.tsx
|
|
4449
|
+
|
|
4450
|
+
|
|
4451
|
+
|
|
4452
|
+
var sideEffects = ["read", "write", "destructive"];
|
|
4453
|
+
var risks = ["low", "medium", "high"];
|
|
4454
|
+
var sideEffectLabel = {
|
|
4455
|
+
read: "Reads data",
|
|
4456
|
+
write: "Makes changes",
|
|
4457
|
+
destructive: "Deletes or overwrites"
|
|
4458
|
+
};
|
|
4459
|
+
var riskLabel = {
|
|
4460
|
+
low: "Low Risk",
|
|
4461
|
+
medium: "Medium Risk",
|
|
4462
|
+
high: "High Risk"
|
|
4463
|
+
};
|
|
4464
|
+
var cardProps = _v4.z.object({
|
|
4465
|
+
agent: _v4.z.string().describe("Assistant name shown in the request, e.g. Trademark Filing Assistant."),
|
|
4466
|
+
tool: _v4.z.string().describe("Tool the assistant wants to run, e.g. get_user_details."),
|
|
4467
|
+
sideEffect: _v4.z.enum(sideEffects).optional().describe('What the tool does: "read", "write", or "destructive".'),
|
|
4468
|
+
risk: _v4.z.enum(risks).optional().describe('Risk level: "low", "medium", or "high".')
|
|
4469
|
+
});
|
|
4470
|
+
var TOOL_APPROVAL_CARD_DESCRIPTION = "Custom component. Asks the user to approve, reject, or edit a tool call before it runs. ToolApprovalCard(agent, tool, sideEffect?, risk?). Use it when an assistant wants to run a tool that needs the user's decision.";
|
|
4471
|
+
function ShieldIcon() {
|
|
4472
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "june-approval-card__glyph", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4473
|
+
"path",
|
|
4474
|
+
{
|
|
4475
|
+
fill: "currentColor",
|
|
4476
|
+
d: "M12 2.2 4.8 5.1v6.3c0 4.6 3 8.6 7.2 9.6 4.2-1 7.2-5 7.2-9.6V5.1L12 2.2zm0 2.1 5.4 2.1v4.9c0 3.5-2.2 6.6-5.4 7.5-3.2-.9-5.4-4-5.4-7.5V6.4L12 4.3z"
|
|
4477
|
+
}
|
|
4478
|
+
) });
|
|
4479
|
+
}
|
|
4480
|
+
function CheckIcon() {
|
|
4481
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "june-approval-card__btn-icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", d: "M3.2 8.2 6.4 11.4 12.8 4.6" }) });
|
|
4482
|
+
}
|
|
4483
|
+
function CrossIcon() {
|
|
4484
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "june-approval-card__btn-icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", d: "M4.2 4.2 11.8 11.8M11.8 4.2 4.2 11.8" }) });
|
|
4485
|
+
}
|
|
4486
|
+
function PencilIcon() {
|
|
4487
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "june-approval-card__btn-icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4488
|
+
"path",
|
|
4489
|
+
{
|
|
4490
|
+
fill: "none",
|
|
4491
|
+
stroke: "currentColor",
|
|
4492
|
+
strokeWidth: "1.4",
|
|
4493
|
+
strokeLinecap: "round",
|
|
4494
|
+
strokeLinejoin: "round",
|
|
4495
|
+
d: "M9.2 3.2 12.8 6.8 5.6 14H2v-3.6L9.2 3.2z"
|
|
4496
|
+
}
|
|
4497
|
+
) });
|
|
4498
|
+
}
|
|
4499
|
+
function ToolApprovalCard({ agent, tool, sideEffect, risk }) {
|
|
4500
|
+
const triggerAction = _reactlang.useTriggerAction.call(void 0, );
|
|
4501
|
+
const { isStreaming } = useJuneRuntime();
|
|
4502
|
+
const payload = { agent, tool, sideEffect: _nullishCoalesce(sideEffect, () => ( null)), risk: _nullishCoalesce(risk, () => ( null)) };
|
|
4503
|
+
const choose = (choice, label) => {
|
|
4504
|
+
if (isStreaming) return;
|
|
4505
|
+
void triggerAction(`${label} ${tool}`, void 0, {
|
|
4506
|
+
type: `${choice}_tool`,
|
|
4507
|
+
params: { ...payload, choice }
|
|
4508
|
+
});
|
|
4509
|
+
};
|
|
4510
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: "june-approval-card", "data-testid": "tool-approval-card", "data-risk": risk, "aria-label": `${agent} wants to run ${tool}`, children: [
|
|
4511
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "june-approval-card__icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ShieldIcon, {}) }),
|
|
4512
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "june-approval-card__body", children: [
|
|
4513
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "june-approval-card__title", children: [
|
|
4514
|
+
agent,
|
|
4515
|
+
" wants to run ",
|
|
4516
|
+
tool
|
|
4517
|
+
] }),
|
|
4518
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "june-approval-card__meta", children: [
|
|
4519
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "june-approval-card__tool", children: tool }),
|
|
4520
|
+
sideEffect && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "june-approval-card__effect", children: sideEffectLabel[sideEffect] }),
|
|
4521
|
+
risk && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "june-approval-card__risk", "data-risk": risk, children: riskLabel[risk] })
|
|
4522
|
+
] }),
|
|
4523
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "june-approval-card__actions", children: [
|
|
4524
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { type: "button", className: "june-approval-card__button", "data-choice": "approve", disabled: isStreaming, onClick: () => choose("approve", "Approve"), children: [
|
|
4525
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CheckIcon, {}),
|
|
4526
|
+
"Approve"
|
|
4527
|
+
] }),
|
|
4528
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { type: "button", className: "june-approval-card__button", "data-choice": "reject", disabled: isStreaming, onClick: () => choose("reject", "Reject"), children: [
|
|
4529
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CrossIcon, {}),
|
|
4530
|
+
"Reject"
|
|
4531
|
+
] }),
|
|
4532
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { type: "button", className: "june-approval-card__button", "data-choice": "edit", disabled: isStreaming, onClick: () => choose("edit", "Edit"), children: [
|
|
4533
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PencilIcon, {}),
|
|
4534
|
+
"Edit"
|
|
4535
|
+
] })
|
|
4536
|
+
] })
|
|
4537
|
+
] })
|
|
4538
|
+
] });
|
|
4539
|
+
}
|
|
4540
|
+
var JuneToolApprovalCardComponent = defineComponent({
|
|
4541
|
+
name: "ToolApprovalCard",
|
|
4542
|
+
description: TOOL_APPROVAL_CARD_DESCRIPTION,
|
|
4543
|
+
schema: cardProps,
|
|
4544
|
+
component: ToolApprovalCard,
|
|
4545
|
+
slots: ["Card"]
|
|
4546
|
+
});
|
|
4547
|
+
function withToolApprovalCard(library) {
|
|
4548
|
+
try {
|
|
4549
|
+
return library.extend({
|
|
4550
|
+
components: { add: [{ component: JuneToolApprovalCardComponent, slots: ["Card"] }] }
|
|
4551
|
+
});
|
|
4552
|
+
} catch (e14) {
|
|
4553
|
+
return library.extend({ components: { add: [JuneToolApprovalCardComponent] } });
|
|
4554
|
+
}
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4448
4557
|
// src/features/tool-approval/tool-approval-list.tsx
|
|
4449
4558
|
|
|
4450
4559
|
function ToolApprovalList({ approvals, pendingOnly = false, renderItem, labels, className }) {
|
|
@@ -4529,6 +4638,81 @@ function useToolApproval() {
|
|
|
4529
4638
|
);
|
|
4530
4639
|
}
|
|
4531
4640
|
|
|
4641
|
+
// src/features/retry-notice/retry-notice.tsx
|
|
4642
|
+
|
|
4643
|
+
|
|
4644
|
+
|
|
4645
|
+
var noticeProps = _v4.z.object({
|
|
4646
|
+
title: _v4.z.string().describe("Short heading, e.g. The response couldn't be completed."),
|
|
4647
|
+
message: _v4.z.string().describe("Why it failed and what the user can do next.")
|
|
4648
|
+
});
|
|
4649
|
+
var RETRY_NOTICE_DESCRIPTION = "Custom component. Shows that a response failed and offers Retry. RetryNotice(title, message). Use it when the model or request could not be completed.";
|
|
4650
|
+
function AlertIcon() {
|
|
4651
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: "june-retry__glyph", viewBox: "0 0 20 20", "aria-hidden": "true", children: [
|
|
4652
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "10", cy: "10", r: "9", fill: "currentColor" }),
|
|
4653
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "#fff", d: "M9.1 5.2h1.8v6.2H9.1V5.2zm0 7.6h1.8V14.6H9.1v-1.8z" })
|
|
4654
|
+
] });
|
|
4655
|
+
}
|
|
4656
|
+
function RefreshIcon() {
|
|
4657
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: "june-retry__btn-icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
|
|
4658
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4659
|
+
"path",
|
|
4660
|
+
{
|
|
4661
|
+
fill: "none",
|
|
4662
|
+
stroke: "currentColor",
|
|
4663
|
+
strokeWidth: "1.5",
|
|
4664
|
+
strokeLinecap: "round",
|
|
4665
|
+
strokeLinejoin: "round",
|
|
4666
|
+
d: "M13.2 8a5.2 5.2 0 1 1-1.4-3.5"
|
|
4667
|
+
}
|
|
4668
|
+
),
|
|
4669
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", d: "M13.4 2.8v3.2H10.2" })
|
|
4670
|
+
] });
|
|
4671
|
+
}
|
|
4672
|
+
function RetryNotice({ title, message }) {
|
|
4673
|
+
const triggerAction = _reactlang.useTriggerAction.call(void 0, );
|
|
4674
|
+
const { isStreaming } = useJuneRuntime();
|
|
4675
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: "june-retry", "data-testid": "retry-notice", role: "alert", children: [
|
|
4676
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "june-retry__icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertIcon, {}) }),
|
|
4677
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "june-retry__copy", children: [
|
|
4678
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "june-retry__title", children: title }),
|
|
4679
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "june-retry__message", children: message })
|
|
4680
|
+
] }),
|
|
4681
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
4682
|
+
"button",
|
|
4683
|
+
{
|
|
4684
|
+
type: "button",
|
|
4685
|
+
className: "june-retry__button",
|
|
4686
|
+
disabled: isStreaming,
|
|
4687
|
+
onClick: () => {
|
|
4688
|
+
if (isStreaming) return;
|
|
4689
|
+
void triggerAction("Retry", void 0, { type: "retry", params: { title, message } });
|
|
4690
|
+
},
|
|
4691
|
+
children: [
|
|
4692
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, RefreshIcon, {}),
|
|
4693
|
+
"Retry"
|
|
4694
|
+
]
|
|
4695
|
+
}
|
|
4696
|
+
)
|
|
4697
|
+
] });
|
|
4698
|
+
}
|
|
4699
|
+
var JuneRetryNoticeComponent = defineComponent({
|
|
4700
|
+
name: "RetryNotice",
|
|
4701
|
+
description: RETRY_NOTICE_DESCRIPTION,
|
|
4702
|
+
schema: noticeProps,
|
|
4703
|
+
component: RetryNotice,
|
|
4704
|
+
slots: ["Card"]
|
|
4705
|
+
});
|
|
4706
|
+
function withRetryNotice(library) {
|
|
4707
|
+
try {
|
|
4708
|
+
return library.extend({
|
|
4709
|
+
components: { add: [{ component: JuneRetryNoticeComponent, slots: ["Card"] }] }
|
|
4710
|
+
});
|
|
4711
|
+
} catch (e15) {
|
|
4712
|
+
return library.extend({ components: { add: [JuneRetryNoticeComponent] } });
|
|
4713
|
+
}
|
|
4714
|
+
}
|
|
4715
|
+
|
|
4532
4716
|
// src/adapters/langgraph/langgraph.ts
|
|
4533
4717
|
var AI_TYPES = /* @__PURE__ */ new Set(["ai", "AIMessage", "AIMessageChunk"]);
|
|
4534
4718
|
function isAiMessage(message) {
|
|
@@ -4550,7 +4734,7 @@ function messageContentToText(content) {
|
|
|
4550
4734
|
function parse(data) {
|
|
4551
4735
|
try {
|
|
4552
4736
|
return JSON.parse(data);
|
|
4553
|
-
} catch (
|
|
4737
|
+
} catch (e16) {
|
|
4554
4738
|
return void 0;
|
|
4555
4739
|
}
|
|
4556
4740
|
}
|
|
@@ -4692,4 +4876,12 @@ function interruptToApprovalRequests(value, idPrefix = "interrupt") {
|
|
|
4692
4876
|
|
|
4693
4877
|
|
|
4694
4878
|
|
|
4695
|
-
|
|
4879
|
+
|
|
4880
|
+
|
|
4881
|
+
|
|
4882
|
+
|
|
4883
|
+
|
|
4884
|
+
|
|
4885
|
+
|
|
4886
|
+
|
|
4887
|
+
exports.useJuneTheme = useJuneTheme; exports.JuneRuntimeContext = JuneRuntimeContext; exports.useJuneRuntime = useJuneRuntime; exports.defaultParseActionEvent = defaultParseActionEvent; exports.runAction = runAction; exports.createActionHandler = createActionHandler; exports.JuneDocumentContext = JuneDocumentContext; exports.DocumentEditorConfigContext = DocumentEditorConfigContext; exports.useDocumentEditorConfig = useDocumentEditorConfig; exports.useDocumentOptions = useDocumentOptions; exports.mergeDocuments = mergeDocuments; exports.createDocumentStore = createDocumentStore; exports.rememberDocumentEcho = rememberDocumentEcho; exports.isDocumentEcho = isDocumentEcho; exports.getDefaultDocumentStore = getDefaultDocumentStore; exports.updateDocumentInProgram = updateDocumentInProgram; exports.readDocumentFromProgram = readDocumentFromProgram; exports.useDocumentBridge = useDocumentBridge; exports.DocumentBridge = DocumentBridge; exports.darkTheme = darkTheme; exports.lightTheme = lightTheme; exports.isThemeSet = isThemeSet; exports.resolveThemeVars = resolveThemeVars; exports.createTheme = createTheme; exports.useResolvedTheme = useResolvedTheme; exports.JuneThemeProvider = JuneThemeProvider; exports.normalizeProgram = normalizeProgram; exports.splitResponse = splitResponse; exports.resolveMixedContent = resolveMixedContent; exports.JuneErrorBoundary = JuneErrorBoundary; exports.MarkdownText = MarkdownText; exports.JuneRenderer = JuneRenderer; exports.validateComponentDefinition = validateComponentDefinition; exports.defineComponent = defineComponent; exports.isJuneComponent = isJuneComponent; exports.ComponentRegistry = ComponentRegistry; exports.createComponentRegistry = createComponentRegistry; exports.useRegistryLibrary = useRegistryLibrary; exports.defineJuneComponent = defineJuneComponent; exports.createJuneLibrary = createJuneLibrary; exports.defineJuneAction = defineJuneAction; exports.toAsyncIterable = toAsyncIterable; exports.consumeStream = consumeStream; exports.sseToText = sseToText; exports.jsonFieldExtractor = jsonFieldExtractor; exports.fetchStream = fetchStream; exports.useJuneStream = useJuneStream; exports.registerDocumentExporter = registerDocumentExporter; exports.listDocumentExporters = listDocumentExporters; exports.exportDocument = exportDocument; exports.downloadResult = downloadResult; exports.copyDocumentToClipboard = copyDocumentToClipboard; exports.ALL_EXPORT_FORMATS = ALL_EXPORT_FORMATS; exports.resolveDocumentPresentation = resolveDocumentPresentation; exports.documentPanelWidth = documentPanelWidth; exports.DOCUMENT_COMPONENT_DESCRIPTION = DOCUMENT_COMPONENT_DESCRIPTION; exports.DocumentEditor = DocumentEditor; exports.JuneDocumentEditorComponent = JuneDocumentEditorComponent; exports.withDocumentEditor = withDocumentEditor; exports.getDocumentEditorRules = getDocumentEditorRules; exports.getDocumentEditorInstructions = getDocumentEditorInstructions; exports.documentPromptOptions = documentPromptOptions; exports.serializeDocumentsForAgent = serializeDocumentsForAgent; exports.defaultToolApprovalLabels = defaultToolApprovalLabels; exports.ToolApproval = ToolApproval; exports.TOOL_APPROVAL_CARD_DESCRIPTION = TOOL_APPROVAL_CARD_DESCRIPTION; exports.ToolApprovalCard = ToolApprovalCard; exports.JuneToolApprovalCardComponent = JuneToolApprovalCardComponent; exports.withToolApprovalCard = withToolApprovalCard; exports.ToolApprovalList = ToolApprovalList; exports.useToolApproval = useToolApproval; exports.RETRY_NOTICE_DESCRIPTION = RETRY_NOTICE_DESCRIPTION; exports.RetryNotice = RetryNotice; exports.JuneRetryNoticeComponent = JuneRetryNoticeComponent; exports.withRetryNotice = withRetryNotice; exports.messageContentToText = messageContentToText; exports.createLangGraphExtractor = createLangGraphExtractor; exports.langGraphStreamOptions = langGraphStreamOptions; exports.readLangGraphInterrupts = readLangGraphInterrupts; exports.interruptToApprovalRequests = interruptToApprovalRequests;
|
|
@@ -3705,7 +3705,7 @@ var SAVE_LABEL = {
|
|
|
3705
3705
|
error: "Save failed"
|
|
3706
3706
|
};
|
|
3707
3707
|
var ZOOM_STEPS = [0.5, 0.67, 0.75, 0.9, 1, 1.1, 1.25, 1.5, 1.75, 2];
|
|
3708
|
-
var stepZoom = (
|
|
3708
|
+
var stepZoom = (z4, dir) => dir > 0 ? ZOOM_STEPS.find((s) => s > z4 + 1e-3) ?? z4 : [...ZOOM_STEPS].reverse().find((s) => s < z4 - 1e-3) ?? z4;
|
|
3709
3709
|
function DocumentEditorImpl(props) {
|
|
3710
3710
|
const {
|
|
3711
3711
|
documentId,
|
|
@@ -4445,13 +4445,122 @@ function ToolApproval({
|
|
|
4445
4445
|
);
|
|
4446
4446
|
}
|
|
4447
4447
|
|
|
4448
|
+
// src/features/tool-approval/tool-approval-card.tsx
|
|
4449
|
+
import { useTriggerAction } from "@openuidev/react-lang";
|
|
4450
|
+
import { z as z2 } from "zod/v4";
|
|
4451
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4452
|
+
var sideEffects = ["read", "write", "destructive"];
|
|
4453
|
+
var risks = ["low", "medium", "high"];
|
|
4454
|
+
var sideEffectLabel = {
|
|
4455
|
+
read: "Reads data",
|
|
4456
|
+
write: "Makes changes",
|
|
4457
|
+
destructive: "Deletes or overwrites"
|
|
4458
|
+
};
|
|
4459
|
+
var riskLabel = {
|
|
4460
|
+
low: "Low Risk",
|
|
4461
|
+
medium: "Medium Risk",
|
|
4462
|
+
high: "High Risk"
|
|
4463
|
+
};
|
|
4464
|
+
var cardProps = z2.object({
|
|
4465
|
+
agent: z2.string().describe("Assistant name shown in the request, e.g. Trademark Filing Assistant."),
|
|
4466
|
+
tool: z2.string().describe("Tool the assistant wants to run, e.g. get_user_details."),
|
|
4467
|
+
sideEffect: z2.enum(sideEffects).optional().describe('What the tool does: "read", "write", or "destructive".'),
|
|
4468
|
+
risk: z2.enum(risks).optional().describe('Risk level: "low", "medium", or "high".')
|
|
4469
|
+
});
|
|
4470
|
+
var TOOL_APPROVAL_CARD_DESCRIPTION = "Custom component. Asks the user to approve, reject, or edit a tool call before it runs. ToolApprovalCard(agent, tool, sideEffect?, risk?). Use it when an assistant wants to run a tool that needs the user's decision.";
|
|
4471
|
+
function ShieldIcon() {
|
|
4472
|
+
return /* @__PURE__ */ jsx20("svg", { className: "june-approval-card__glyph", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(
|
|
4473
|
+
"path",
|
|
4474
|
+
{
|
|
4475
|
+
fill: "currentColor",
|
|
4476
|
+
d: "M12 2.2 4.8 5.1v6.3c0 4.6 3 8.6 7.2 9.6 4.2-1 7.2-5 7.2-9.6V5.1L12 2.2zm0 2.1 5.4 2.1v4.9c0 3.5-2.2 6.6-5.4 7.5-3.2-.9-5.4-4-5.4-7.5V6.4L12 4.3z"
|
|
4477
|
+
}
|
|
4478
|
+
) });
|
|
4479
|
+
}
|
|
4480
|
+
function CheckIcon() {
|
|
4481
|
+
return /* @__PURE__ */ jsx20("svg", { className: "june-approval-card__btn-icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx20("path", { fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", d: "M3.2 8.2 6.4 11.4 12.8 4.6" }) });
|
|
4482
|
+
}
|
|
4483
|
+
function CrossIcon() {
|
|
4484
|
+
return /* @__PURE__ */ jsx20("svg", { className: "june-approval-card__btn-icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx20("path", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", d: "M4.2 4.2 11.8 11.8M11.8 4.2 4.2 11.8" }) });
|
|
4485
|
+
}
|
|
4486
|
+
function PencilIcon() {
|
|
4487
|
+
return /* @__PURE__ */ jsx20("svg", { className: "june-approval-card__btn-icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(
|
|
4488
|
+
"path",
|
|
4489
|
+
{
|
|
4490
|
+
fill: "none",
|
|
4491
|
+
stroke: "currentColor",
|
|
4492
|
+
strokeWidth: "1.4",
|
|
4493
|
+
strokeLinecap: "round",
|
|
4494
|
+
strokeLinejoin: "round",
|
|
4495
|
+
d: "M9.2 3.2 12.8 6.8 5.6 14H2v-3.6L9.2 3.2z"
|
|
4496
|
+
}
|
|
4497
|
+
) });
|
|
4498
|
+
}
|
|
4499
|
+
function ToolApprovalCard({ agent, tool, sideEffect, risk }) {
|
|
4500
|
+
const triggerAction = useTriggerAction();
|
|
4501
|
+
const { isStreaming } = useJuneRuntime();
|
|
4502
|
+
const payload = { agent, tool, sideEffect: sideEffect ?? null, risk: risk ?? null };
|
|
4503
|
+
const choose = (choice, label) => {
|
|
4504
|
+
if (isStreaming) return;
|
|
4505
|
+
void triggerAction(`${label} ${tool}`, void 0, {
|
|
4506
|
+
type: `${choice}_tool`,
|
|
4507
|
+
params: { ...payload, choice }
|
|
4508
|
+
});
|
|
4509
|
+
};
|
|
4510
|
+
return /* @__PURE__ */ jsxs13("section", { className: "june-approval-card", "data-testid": "tool-approval-card", "data-risk": risk, "aria-label": `${agent} wants to run ${tool}`, children: [
|
|
4511
|
+
/* @__PURE__ */ jsx20("span", { className: "june-approval-card__icon", children: /* @__PURE__ */ jsx20(ShieldIcon, {}) }),
|
|
4512
|
+
/* @__PURE__ */ jsxs13("div", { className: "june-approval-card__body", children: [
|
|
4513
|
+
/* @__PURE__ */ jsxs13("p", { className: "june-approval-card__title", children: [
|
|
4514
|
+
agent,
|
|
4515
|
+
" wants to run ",
|
|
4516
|
+
tool
|
|
4517
|
+
] }),
|
|
4518
|
+
/* @__PURE__ */ jsxs13("div", { className: "june-approval-card__meta", children: [
|
|
4519
|
+
/* @__PURE__ */ jsx20("span", { className: "june-approval-card__tool", children: tool }),
|
|
4520
|
+
sideEffect && /* @__PURE__ */ jsx20("span", { className: "june-approval-card__effect", children: sideEffectLabel[sideEffect] }),
|
|
4521
|
+
risk && /* @__PURE__ */ jsx20("span", { className: "june-approval-card__risk", "data-risk": risk, children: riskLabel[risk] })
|
|
4522
|
+
] }),
|
|
4523
|
+
/* @__PURE__ */ jsxs13("div", { className: "june-approval-card__actions", children: [
|
|
4524
|
+
/* @__PURE__ */ jsxs13("button", { type: "button", className: "june-approval-card__button", "data-choice": "approve", disabled: isStreaming, onClick: () => choose("approve", "Approve"), children: [
|
|
4525
|
+
/* @__PURE__ */ jsx20(CheckIcon, {}),
|
|
4526
|
+
"Approve"
|
|
4527
|
+
] }),
|
|
4528
|
+
/* @__PURE__ */ jsxs13("button", { type: "button", className: "june-approval-card__button", "data-choice": "reject", disabled: isStreaming, onClick: () => choose("reject", "Reject"), children: [
|
|
4529
|
+
/* @__PURE__ */ jsx20(CrossIcon, {}),
|
|
4530
|
+
"Reject"
|
|
4531
|
+
] }),
|
|
4532
|
+
/* @__PURE__ */ jsxs13("button", { type: "button", className: "june-approval-card__button", "data-choice": "edit", disabled: isStreaming, onClick: () => choose("edit", "Edit"), children: [
|
|
4533
|
+
/* @__PURE__ */ jsx20(PencilIcon, {}),
|
|
4534
|
+
"Edit"
|
|
4535
|
+
] })
|
|
4536
|
+
] })
|
|
4537
|
+
] })
|
|
4538
|
+
] });
|
|
4539
|
+
}
|
|
4540
|
+
var JuneToolApprovalCardComponent = defineComponent({
|
|
4541
|
+
name: "ToolApprovalCard",
|
|
4542
|
+
description: TOOL_APPROVAL_CARD_DESCRIPTION,
|
|
4543
|
+
schema: cardProps,
|
|
4544
|
+
component: ToolApprovalCard,
|
|
4545
|
+
slots: ["Card"]
|
|
4546
|
+
});
|
|
4547
|
+
function withToolApprovalCard(library) {
|
|
4548
|
+
try {
|
|
4549
|
+
return library.extend({
|
|
4550
|
+
components: { add: [{ component: JuneToolApprovalCardComponent, slots: ["Card"] }] }
|
|
4551
|
+
});
|
|
4552
|
+
} catch {
|
|
4553
|
+
return library.extend({ components: { add: [JuneToolApprovalCardComponent] } });
|
|
4554
|
+
}
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4448
4557
|
// src/features/tool-approval/tool-approval-list.tsx
|
|
4449
|
-
import { jsx as
|
|
4558
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
4450
4559
|
function ToolApprovalList({ approvals, pendingOnly = false, renderItem, labels, className }) {
|
|
4451
4560
|
const entries = pendingOnly ? approvals.entries.filter((e) => e.status === "pending") : approvals.entries;
|
|
4452
4561
|
if (entries.length === 0) return null;
|
|
4453
|
-
return /* @__PURE__ */
|
|
4454
|
-
(entry) => renderItem ? /* @__PURE__ */
|
|
4562
|
+
return /* @__PURE__ */ jsx21("div", { className: className ? `june-approval-list ${className}` : "june-approval-list", children: entries.map(
|
|
4563
|
+
(entry) => renderItem ? /* @__PURE__ */ jsx21("div", { children: renderItem(entry, approvals.decide) }, entry.request.id) : /* @__PURE__ */ jsx21(
|
|
4455
4564
|
ToolApproval,
|
|
4456
4565
|
{
|
|
4457
4566
|
request: entry.request,
|
|
@@ -4529,6 +4638,81 @@ function useToolApproval() {
|
|
|
4529
4638
|
);
|
|
4530
4639
|
}
|
|
4531
4640
|
|
|
4641
|
+
// src/features/retry-notice/retry-notice.tsx
|
|
4642
|
+
import { useTriggerAction as useTriggerAction2 } from "@openuidev/react-lang";
|
|
4643
|
+
import { z as z3 } from "zod/v4";
|
|
4644
|
+
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4645
|
+
var noticeProps = z3.object({
|
|
4646
|
+
title: z3.string().describe("Short heading, e.g. The response couldn't be completed."),
|
|
4647
|
+
message: z3.string().describe("Why it failed and what the user can do next.")
|
|
4648
|
+
});
|
|
4649
|
+
var RETRY_NOTICE_DESCRIPTION = "Custom component. Shows that a response failed and offers Retry. RetryNotice(title, message). Use it when the model or request could not be completed.";
|
|
4650
|
+
function AlertIcon() {
|
|
4651
|
+
return /* @__PURE__ */ jsxs14("svg", { className: "june-retry__glyph", viewBox: "0 0 20 20", "aria-hidden": "true", children: [
|
|
4652
|
+
/* @__PURE__ */ jsx22("circle", { cx: "10", cy: "10", r: "9", fill: "currentColor" }),
|
|
4653
|
+
/* @__PURE__ */ jsx22("path", { fill: "#fff", d: "M9.1 5.2h1.8v6.2H9.1V5.2zm0 7.6h1.8V14.6H9.1v-1.8z" })
|
|
4654
|
+
] });
|
|
4655
|
+
}
|
|
4656
|
+
function RefreshIcon() {
|
|
4657
|
+
return /* @__PURE__ */ jsxs14("svg", { className: "june-retry__btn-icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
|
|
4658
|
+
/* @__PURE__ */ jsx22(
|
|
4659
|
+
"path",
|
|
4660
|
+
{
|
|
4661
|
+
fill: "none",
|
|
4662
|
+
stroke: "currentColor",
|
|
4663
|
+
strokeWidth: "1.5",
|
|
4664
|
+
strokeLinecap: "round",
|
|
4665
|
+
strokeLinejoin: "round",
|
|
4666
|
+
d: "M13.2 8a5.2 5.2 0 1 1-1.4-3.5"
|
|
4667
|
+
}
|
|
4668
|
+
),
|
|
4669
|
+
/* @__PURE__ */ jsx22("path", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", d: "M13.4 2.8v3.2H10.2" })
|
|
4670
|
+
] });
|
|
4671
|
+
}
|
|
4672
|
+
function RetryNotice({ title, message }) {
|
|
4673
|
+
const triggerAction = useTriggerAction2();
|
|
4674
|
+
const { isStreaming } = useJuneRuntime();
|
|
4675
|
+
return /* @__PURE__ */ jsxs14("section", { className: "june-retry", "data-testid": "retry-notice", role: "alert", children: [
|
|
4676
|
+
/* @__PURE__ */ jsx22("span", { className: "june-retry__icon", children: /* @__PURE__ */ jsx22(AlertIcon, {}) }),
|
|
4677
|
+
/* @__PURE__ */ jsxs14("div", { className: "june-retry__copy", children: [
|
|
4678
|
+
/* @__PURE__ */ jsx22("p", { className: "june-retry__title", children: title }),
|
|
4679
|
+
/* @__PURE__ */ jsx22("p", { className: "june-retry__message", children: message })
|
|
4680
|
+
] }),
|
|
4681
|
+
/* @__PURE__ */ jsxs14(
|
|
4682
|
+
"button",
|
|
4683
|
+
{
|
|
4684
|
+
type: "button",
|
|
4685
|
+
className: "june-retry__button",
|
|
4686
|
+
disabled: isStreaming,
|
|
4687
|
+
onClick: () => {
|
|
4688
|
+
if (isStreaming) return;
|
|
4689
|
+
void triggerAction("Retry", void 0, { type: "retry", params: { title, message } });
|
|
4690
|
+
},
|
|
4691
|
+
children: [
|
|
4692
|
+
/* @__PURE__ */ jsx22(RefreshIcon, {}),
|
|
4693
|
+
"Retry"
|
|
4694
|
+
]
|
|
4695
|
+
}
|
|
4696
|
+
)
|
|
4697
|
+
] });
|
|
4698
|
+
}
|
|
4699
|
+
var JuneRetryNoticeComponent = defineComponent({
|
|
4700
|
+
name: "RetryNotice",
|
|
4701
|
+
description: RETRY_NOTICE_DESCRIPTION,
|
|
4702
|
+
schema: noticeProps,
|
|
4703
|
+
component: RetryNotice,
|
|
4704
|
+
slots: ["Card"]
|
|
4705
|
+
});
|
|
4706
|
+
function withRetryNotice(library) {
|
|
4707
|
+
try {
|
|
4708
|
+
return library.extend({
|
|
4709
|
+
components: { add: [{ component: JuneRetryNoticeComponent, slots: ["Card"] }] }
|
|
4710
|
+
});
|
|
4711
|
+
} catch {
|
|
4712
|
+
return library.extend({ components: { add: [JuneRetryNoticeComponent] } });
|
|
4713
|
+
}
|
|
4714
|
+
}
|
|
4715
|
+
|
|
4532
4716
|
// src/adapters/langgraph/langgraph.ts
|
|
4533
4717
|
var AI_TYPES = /* @__PURE__ */ new Set(["ai", "AIMessage", "AIMessageChunk"]);
|
|
4534
4718
|
function isAiMessage(message) {
|
|
@@ -4685,8 +4869,16 @@ export {
|
|
|
4685
4869
|
serializeDocumentsForAgent,
|
|
4686
4870
|
defaultToolApprovalLabels,
|
|
4687
4871
|
ToolApproval,
|
|
4872
|
+
TOOL_APPROVAL_CARD_DESCRIPTION,
|
|
4873
|
+
ToolApprovalCard,
|
|
4874
|
+
JuneToolApprovalCardComponent,
|
|
4875
|
+
withToolApprovalCard,
|
|
4688
4876
|
ToolApprovalList,
|
|
4689
4877
|
useToolApproval,
|
|
4878
|
+
RETRY_NOTICE_DESCRIPTION,
|
|
4879
|
+
RetryNotice,
|
|
4880
|
+
JuneRetryNoticeComponent,
|
|
4881
|
+
withRetryNotice,
|
|
4690
4882
|
messageContentToText,
|
|
4691
4883
|
createLangGraphExtractor,
|
|
4692
4884
|
langGraphStreamOptions,
|
package/dist/entry-core.cjs
CHANGED
|
@@ -71,7 +71,15 @@
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
var _chunkNMTAZCQDcjs = require('./chunk-NMTAZCQD.cjs');
|
|
75
83
|
|
|
76
84
|
|
|
77
85
|
|
|
@@ -153,4 +161,12 @@ var _chunkG6YPSE6Jcjs = require('./chunk-G6YPSE6J.cjs');
|
|
|
153
161
|
|
|
154
162
|
|
|
155
163
|
|
|
156
|
-
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
exports.ALL_EXPORT_FORMATS = _chunkNMTAZCQDcjs.ALL_EXPORT_FORMATS; exports.ComponentRegistry = _chunkNMTAZCQDcjs.ComponentRegistry; exports.DOCUMENT_COMPONENT_DESCRIPTION = _chunkNMTAZCQDcjs.DOCUMENT_COMPONENT_DESCRIPTION; exports.DocumentBridge = _chunkNMTAZCQDcjs.DocumentBridge; exports.DocumentEditor = _chunkNMTAZCQDcjs.DocumentEditor; exports.DocumentEditorConfigContext = _chunkNMTAZCQDcjs.DocumentEditorConfigContext; exports.JuneDocumentContext = _chunkNMTAZCQDcjs.JuneDocumentContext; exports.JuneDocumentEditorComponent = _chunkNMTAZCQDcjs.JuneDocumentEditorComponent; exports.JuneError = _chunkG6YPSE6Jcjs.JuneError; exports.JuneErrorBoundary = _chunkNMTAZCQDcjs.JuneErrorBoundary; exports.JuneRenderer = _chunkNMTAZCQDcjs.JuneRenderer; exports.JuneRetryNoticeComponent = _chunkNMTAZCQDcjs.JuneRetryNoticeComponent; exports.JuneRuntimeContext = _chunkNMTAZCQDcjs.JuneRuntimeContext; exports.JuneThemeProvider = _chunkNMTAZCQDcjs.JuneThemeProvider; exports.JuneToolApprovalCardComponent = _chunkNMTAZCQDcjs.JuneToolApprovalCardComponent; exports.MarkdownText = _chunkNMTAZCQDcjs.MarkdownText; exports.RETRY_NOTICE_DESCRIPTION = _chunkNMTAZCQDcjs.RETRY_NOTICE_DESCRIPTION; exports.RetryNotice = _chunkNMTAZCQDcjs.RetryNotice; exports.TOOL_APPROVAL_CARD_DESCRIPTION = _chunkNMTAZCQDcjs.TOOL_APPROVAL_CARD_DESCRIPTION; exports.ToolApproval = _chunkNMTAZCQDcjs.ToolApproval; exports.ToolApprovalCard = _chunkNMTAZCQDcjs.ToolApprovalCard; exports.ToolApprovalList = _chunkNMTAZCQDcjs.ToolApprovalList; exports.consumeStream = _chunkNMTAZCQDcjs.consumeStream; exports.copyDocumentToClipboard = _chunkNMTAZCQDcjs.copyDocumentToClipboard; exports.createActionHandler = _chunkNMTAZCQDcjs.createActionHandler; exports.createComponentRegistry = _chunkNMTAZCQDcjs.createComponentRegistry; exports.createDocumentStore = _chunkNMTAZCQDcjs.createDocumentStore; exports.createJuneLibrary = _chunkNMTAZCQDcjs.createJuneLibrary; exports.createLangGraphExtractor = _chunkNMTAZCQDcjs.createLangGraphExtractor; exports.createTheme = _chunkNMTAZCQDcjs.createTheme; exports.darkTheme = _chunkNMTAZCQDcjs.darkTheme; exports.defaultParseActionEvent = _chunkNMTAZCQDcjs.defaultParseActionEvent; exports.defaultToolApprovalLabels = _chunkNMTAZCQDcjs.defaultToolApprovalLabels; exports.defineComponent = _chunkNMTAZCQDcjs.defineComponent; exports.defineJuneAction = _chunkNMTAZCQDcjs.defineJuneAction; exports.defineJuneComponent = _chunkNMTAZCQDcjs.defineJuneComponent; exports.documentPanelWidth = _chunkNMTAZCQDcjs.documentPanelWidth; exports.documentPromptOptions = _chunkNMTAZCQDcjs.documentPromptOptions; exports.downloadResult = _chunkNMTAZCQDcjs.downloadResult; exports.exportDocument = _chunkNMTAZCQDcjs.exportDocument; exports.fetchStream = _chunkNMTAZCQDcjs.fetchStream; exports.getDefaultDocumentStore = _chunkNMTAZCQDcjs.getDefaultDocumentStore; exports.getDocumentEditorInstructions = _chunkNMTAZCQDcjs.getDocumentEditorInstructions; exports.getDocumentEditorRules = _chunkNMTAZCQDcjs.getDocumentEditorRules; exports.interruptToApprovalRequests = _chunkNMTAZCQDcjs.interruptToApprovalRequests; exports.isDocumentEcho = _chunkNMTAZCQDcjs.isDocumentEcho; exports.isJuneComponent = _chunkNMTAZCQDcjs.isJuneComponent; exports.isJuneError = _chunkG6YPSE6Jcjs.isJuneError; exports.isThemeSet = _chunkNMTAZCQDcjs.isThemeSet; exports.jsonFieldExtractor = _chunkNMTAZCQDcjs.jsonFieldExtractor; exports.langGraphStreamOptions = _chunkNMTAZCQDcjs.langGraphStreamOptions; exports.lightTheme = _chunkNMTAZCQDcjs.lightTheme; exports.listDocumentExporters = _chunkNMTAZCQDcjs.listDocumentExporters; exports.mergeDocuments = _chunkNMTAZCQDcjs.mergeDocuments; exports.messageContentToText = _chunkNMTAZCQDcjs.messageContentToText; exports.normalizeProgram = _chunkNMTAZCQDcjs.normalizeProgram; exports.readDocumentFromProgram = _chunkNMTAZCQDcjs.readDocumentFromProgram; exports.readLangGraphInterrupts = _chunkNMTAZCQDcjs.readLangGraphInterrupts; exports.registerDocumentExporter = _chunkNMTAZCQDcjs.registerDocumentExporter; exports.rememberDocumentEcho = _chunkNMTAZCQDcjs.rememberDocumentEcho; exports.resolveDocumentPresentation = _chunkNMTAZCQDcjs.resolveDocumentPresentation; exports.resolveMixedContent = _chunkNMTAZCQDcjs.resolveMixedContent; exports.resolveThemeVars = _chunkNMTAZCQDcjs.resolveThemeVars; exports.runAction = _chunkNMTAZCQDcjs.runAction; exports.serializeDocumentsForAgent = _chunkNMTAZCQDcjs.serializeDocumentsForAgent; exports.splitResponse = _chunkNMTAZCQDcjs.splitResponse; exports.sseToText = _chunkNMTAZCQDcjs.sseToText; exports.toAsyncIterable = _chunkNMTAZCQDcjs.toAsyncIterable; exports.toJuneError = _chunkG6YPSE6Jcjs.toJuneError; exports.updateDocumentInProgram = _chunkNMTAZCQDcjs.updateDocumentInProgram; exports.useDocumentBridge = _chunkNMTAZCQDcjs.useDocumentBridge; exports.useDocumentEditorConfig = _chunkNMTAZCQDcjs.useDocumentEditorConfig; exports.useDocumentOptions = _chunkNMTAZCQDcjs.useDocumentOptions; exports.useJuneRuntime = _chunkNMTAZCQDcjs.useJuneRuntime; exports.useJuneStream = _chunkNMTAZCQDcjs.useJuneStream; exports.useJuneTheme = _chunkNMTAZCQDcjs.useJuneTheme; exports.useRegistryLibrary = _chunkNMTAZCQDcjs.useRegistryLibrary; exports.useResolvedTheme = _chunkNMTAZCQDcjs.useResolvedTheme; exports.useToolApproval = _chunkNMTAZCQDcjs.useToolApproval; exports.validateComponentDefinition = _chunkNMTAZCQDcjs.validateComponentDefinition; exports.withDocumentEditor = _chunkNMTAZCQDcjs.withDocumentEditor; exports.withRetryNotice = _chunkNMTAZCQDcjs.withRetryNotice; exports.withToolApprovalCard = _chunkNMTAZCQDcjs.withToolApprovalCard;
|
package/dist/entry-core.d.cts
CHANGED
|
@@ -769,7 +769,7 @@ declare const JuneDocumentEditorComponent: _openuidev_react_lang.DefinedComponen
|
|
|
769
769
|
"side-panel": "side-panel";
|
|
770
770
|
}>>;
|
|
771
771
|
}, z.core.$strip>>;
|
|
772
|
-
type Extendable = Library & {
|
|
772
|
+
type Extendable$2 = Library & {
|
|
773
773
|
extend: NonNullable<Library["extend"]>;
|
|
774
774
|
};
|
|
775
775
|
/**
|
|
@@ -778,7 +778,7 @@ type Extendable = Library & {
|
|
|
778
778
|
* `util.mergeDefs`, and OpenUI's slot clone calls that, so the slot step is skipped
|
|
779
779
|
* there. The component is still registered and can be rendered.
|
|
780
780
|
*/
|
|
781
|
-
declare function withDocumentEditor(library: Extendable): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
781
|
+
declare function withDocumentEditor(library: Extendable$2): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
782
782
|
|
|
783
783
|
declare const JuneDocumentContext: react.Context<JuneDocumentOptions>;
|
|
784
784
|
/** App-wide `documentEditor` config from JuneUI. Empty when the app did not set one. */
|
|
@@ -949,6 +949,44 @@ interface ToolApprovalProps {
|
|
|
949
949
|
*/
|
|
950
950
|
declare function ToolApproval({ request, status, onDecide, disabled, error, labels: labelOverrides, renderArguments, className, }: ToolApprovalProps): react.JSX.Element;
|
|
951
951
|
|
|
952
|
+
declare const cardProps: z.ZodObject<{
|
|
953
|
+
agent: z.ZodString;
|
|
954
|
+
tool: z.ZodString;
|
|
955
|
+
sideEffect: z.ZodOptional<z.ZodEnum<{
|
|
956
|
+
read: "read";
|
|
957
|
+
write: "write";
|
|
958
|
+
destructive: "destructive";
|
|
959
|
+
}>>;
|
|
960
|
+
risk: z.ZodOptional<z.ZodEnum<{
|
|
961
|
+
medium: "medium";
|
|
962
|
+
high: "high";
|
|
963
|
+
low: "low";
|
|
964
|
+
}>>;
|
|
965
|
+
}, z.core.$strip>;
|
|
966
|
+
type ToolApprovalCardProps = z.infer<typeof cardProps>;
|
|
967
|
+
declare const TOOL_APPROVAL_CARD_DESCRIPTION = "Custom component. Asks the user to approve, reject, or edit a tool call before it runs. ToolApprovalCard(agent, tool, sideEffect?, risk?). Use it when an assistant wants to run a tool that needs the user's decision.";
|
|
968
|
+
/** Approval card the model can place in a response. Buttons fire the existing action pipeline. */
|
|
969
|
+
declare function ToolApprovalCard({ agent, tool, sideEffect, risk }: ToolApprovalCardProps): react.JSX.Element;
|
|
970
|
+
declare const JuneToolApprovalCardComponent: JuneComponent<z.ZodObject<{
|
|
971
|
+
agent: z.ZodString;
|
|
972
|
+
tool: z.ZodString;
|
|
973
|
+
sideEffect: z.ZodOptional<z.ZodEnum<{
|
|
974
|
+
read: "read";
|
|
975
|
+
write: "write";
|
|
976
|
+
destructive: "destructive";
|
|
977
|
+
}>>;
|
|
978
|
+
risk: z.ZodOptional<z.ZodEnum<{
|
|
979
|
+
medium: "medium";
|
|
980
|
+
high: "high";
|
|
981
|
+
low: "low";
|
|
982
|
+
}>>;
|
|
983
|
+
}, z.core.$strip>>;
|
|
984
|
+
type Extendable$1 = Library & {
|
|
985
|
+
extend: NonNullable<Library["extend"]>;
|
|
986
|
+
};
|
|
987
|
+
/** Adds ToolApprovalCard to a library. Card may contain it when slot cloning succeeds. */
|
|
988
|
+
declare function withToolApprovalCard(library: Extendable$1): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
989
|
+
|
|
952
990
|
type ToolApprovalInput = Omit<ToolApprovalRequest, "id"> & {
|
|
953
991
|
id?: string;
|
|
954
992
|
};
|
|
@@ -990,6 +1028,24 @@ interface ToolApprovalListProps {
|
|
|
990
1028
|
/** Renders every request from `useToolApproval()` and wires its buttons. */
|
|
991
1029
|
declare function ToolApprovalList({ approvals, pendingOnly, renderItem, labels, className }: ToolApprovalListProps): react.JSX.Element | null;
|
|
992
1030
|
|
|
1031
|
+
declare const noticeProps: z.ZodObject<{
|
|
1032
|
+
title: z.ZodString;
|
|
1033
|
+
message: z.ZodString;
|
|
1034
|
+
}, z.core.$strip>;
|
|
1035
|
+
type RetryNoticeProps = z.infer<typeof noticeProps>;
|
|
1036
|
+
declare const RETRY_NOTICE_DESCRIPTION = "Custom component. Shows that a response failed and offers Retry. RetryNotice(title, message). Use it when the model or request could not be completed.";
|
|
1037
|
+
/** Failure notice with a Retry button. The click goes through the existing action pipeline as `retry`. */
|
|
1038
|
+
declare function RetryNotice({ title, message }: RetryNoticeProps): react.JSX.Element;
|
|
1039
|
+
declare const JuneRetryNoticeComponent: JuneComponent<z.ZodObject<{
|
|
1040
|
+
title: z.ZodString;
|
|
1041
|
+
message: z.ZodString;
|
|
1042
|
+
}, z.core.$strip>>;
|
|
1043
|
+
type Extendable = Library & {
|
|
1044
|
+
extend: NonNullable<Library["extend"]>;
|
|
1045
|
+
};
|
|
1046
|
+
/** Adds RetryNotice to a library. Card may contain it when slot cloning succeeds. */
|
|
1047
|
+
declare function withRetryNotice(library: Extendable): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
1048
|
+
|
|
993
1049
|
/**
|
|
994
1050
|
* LangGraph adapter: turns a LangGraph run stream (SSE from the LangGraph server API, e.g.
|
|
995
1051
|
* `POST /threads/{thread_id}/runs/stream`) into the plain text June renders.
|
|
@@ -1043,4 +1099,4 @@ declare function readLangGraphInterrupts(data: string, event?: string): unknown[
|
|
|
1043
1099
|
*/
|
|
1044
1100
|
declare function interruptToApprovalRequests(value: unknown, idPrefix?: string): ToolApprovalRequest[];
|
|
1045
1101
|
|
|
1046
|
-
export { ALL_EXPORT_FORMATS, type ActionEventParser, type ActionOutcome, type AnyComponentDefinition, type ApprovalChoice, type ComponentProps, ComponentRegistry, type ComponentRegistryOptions, type ConfirmAction, type ConsumeStreamOptions, DOCUMENT_COMPONENT_DESCRIPTION, type DefineComponentOptions, type DocJSON, type DocNode, DocumentBridge, type DocumentBridgeOptions, type DocumentChange, type DocumentConflict, DocumentEditor, type DocumentEditorConfig, DocumentEditorConfigContext, type DocumentEditorProps, type DocumentExportEvent, type DocumentExportFormat, type DocumentExporter, type DocumentInstructionOptions, type DocumentPresentation, type DocumentProgramUpdate, type DocumentRecord, type DocumentSavePayload, type DocumentSnapshot, type DocumentStore, type ExportContext, type ExportResult, type FallbackArgs, type FetchStreamOptions, type IncomingDocument, type JuneAction, type JuneActionContext, type JuneActionDefinition, type JuneActionMap, type JuneComponent, type JuneComponentMeta, type JuneContextValue, JuneDocumentContext, JuneDocumentEditorComponent, type JuneDocumentOptions, JuneError, JuneErrorBoundary, type JuneErrorBoundaryProps, type JuneErrorCode, type JuneErrorOptions, type JuneLibraryOptions, type JuneRenderProps, JuneRenderer, type JuneRendererProps, type JuneResolvedTheme, JuneRuntimeContext, type JuneRuntimeValue, type JuneStreamState, type JuneThemeInput, type JuneThemeMode, JuneThemeProvider, type JuneThemeProviderProps, type JuneThemeSet, type JuneThemeToken, type JuneThemeVars, type LangGraphExtractorOptions, MarkdownText, type MarkdownTextProps, type MixedContent, type MixedContentOptions, type OpenUIActionEvent, type OpenUILibrary, type OpenUIRendererProps, type ParsedActionEvent, type PendingUpdate, type ReceiveOutcome, type RegisterOptions, type ResolveChoice, type ResponseChangeInfo, type RunActionOptions, type SchemaLike, type SplitOptions, type SplitResponse, type SseOptions, type StreamChunk, type StreamSource, type StreamStarter, type StreamStatus, type TextFormat, ToolApproval, type ToolApprovalDecision, type ToolApprovalEntry, type ToolApprovalInput, type ToolApprovalLabels, ToolApprovalList, type ToolApprovalListProps, type ToolApprovalProps, type ToolApprovalRequest, type ToolApprovalStatus, type UseJuneStreamOptions, type UseJuneStreamResult, type UseToolApprovalResult, consumeStream, copyDocumentToClipboard, createActionHandler, createComponentRegistry, createDocumentStore, createJuneLibrary, createLangGraphExtractor, createTheme, darkTheme, defaultParseActionEvent, defaultToolApprovalLabels, defineComponent, defineJuneAction, defineJuneComponent, documentPanelWidth, documentPromptOptions, downloadResult, exportDocument, fetchStream, getDefaultDocumentStore, getDocumentEditorInstructions, getDocumentEditorRules, interruptToApprovalRequests, isDocumentEcho, isJuneComponent, isJuneError, isThemeSet, jsonFieldExtractor, langGraphStreamOptions, lightTheme, listDocumentExporters, mergeDocuments, messageContentToText, normalizeProgram, readDocumentFromProgram, readLangGraphInterrupts, registerDocumentExporter, rememberDocumentEcho, resolveDocumentPresentation, resolveMixedContent, resolveThemeVars, runAction, serializeDocumentsForAgent, splitResponse, sseToText, toAsyncIterable, toJuneError, updateDocumentInProgram, useDocumentBridge, useDocumentEditorConfig, useDocumentOptions, useJuneRuntime, useJuneStream, useJuneTheme, useRegistryLibrary, useResolvedTheme, useToolApproval, validateComponentDefinition, withDocumentEditor };
|
|
1102
|
+
export { ALL_EXPORT_FORMATS, type ActionEventParser, type ActionOutcome, type AnyComponentDefinition, type ApprovalChoice, type ComponentProps, ComponentRegistry, type ComponentRegistryOptions, type ConfirmAction, type ConsumeStreamOptions, DOCUMENT_COMPONENT_DESCRIPTION, type DefineComponentOptions, type DocJSON, type DocNode, DocumentBridge, type DocumentBridgeOptions, type DocumentChange, type DocumentConflict, DocumentEditor, type DocumentEditorConfig, DocumentEditorConfigContext, type DocumentEditorProps, type DocumentExportEvent, type DocumentExportFormat, type DocumentExporter, type DocumentInstructionOptions, type DocumentPresentation, type DocumentProgramUpdate, type DocumentRecord, type DocumentSavePayload, type DocumentSnapshot, type DocumentStore, type ExportContext, type ExportResult, type FallbackArgs, type FetchStreamOptions, type IncomingDocument, type JuneAction, type JuneActionContext, type JuneActionDefinition, type JuneActionMap, type JuneComponent, type JuneComponentMeta, type JuneContextValue, JuneDocumentContext, JuneDocumentEditorComponent, type JuneDocumentOptions, JuneError, JuneErrorBoundary, type JuneErrorBoundaryProps, type JuneErrorCode, type JuneErrorOptions, type JuneLibraryOptions, type JuneRenderProps, JuneRenderer, type JuneRendererProps, type JuneResolvedTheme, JuneRetryNoticeComponent, JuneRuntimeContext, type JuneRuntimeValue, type JuneStreamState, type JuneThemeInput, type JuneThemeMode, JuneThemeProvider, type JuneThemeProviderProps, type JuneThemeSet, type JuneThemeToken, type JuneThemeVars, JuneToolApprovalCardComponent, type LangGraphExtractorOptions, MarkdownText, type MarkdownTextProps, type MixedContent, type MixedContentOptions, type OpenUIActionEvent, type OpenUILibrary, type OpenUIRendererProps, type ParsedActionEvent, type PendingUpdate, RETRY_NOTICE_DESCRIPTION, type ReceiveOutcome, type RegisterOptions, type ResolveChoice, type ResponseChangeInfo, RetryNotice, type RetryNoticeProps, type RunActionOptions, type SchemaLike, type SplitOptions, type SplitResponse, type SseOptions, type StreamChunk, type StreamSource, type StreamStarter, type StreamStatus, TOOL_APPROVAL_CARD_DESCRIPTION, type TextFormat, ToolApproval, ToolApprovalCard, type ToolApprovalCardProps, type ToolApprovalDecision, type ToolApprovalEntry, type ToolApprovalInput, type ToolApprovalLabels, ToolApprovalList, type ToolApprovalListProps, type ToolApprovalProps, type ToolApprovalRequest, type ToolApprovalStatus, type UseJuneStreamOptions, type UseJuneStreamResult, type UseToolApprovalResult, consumeStream, copyDocumentToClipboard, createActionHandler, createComponentRegistry, createDocumentStore, createJuneLibrary, createLangGraphExtractor, createTheme, darkTheme, defaultParseActionEvent, defaultToolApprovalLabels, defineComponent, defineJuneAction, defineJuneComponent, documentPanelWidth, documentPromptOptions, downloadResult, exportDocument, fetchStream, getDefaultDocumentStore, getDocumentEditorInstructions, getDocumentEditorRules, interruptToApprovalRequests, isDocumentEcho, isJuneComponent, isJuneError, isThemeSet, jsonFieldExtractor, langGraphStreamOptions, lightTheme, listDocumentExporters, mergeDocuments, messageContentToText, normalizeProgram, readDocumentFromProgram, readLangGraphInterrupts, registerDocumentExporter, rememberDocumentEcho, resolveDocumentPresentation, resolveMixedContent, resolveThemeVars, runAction, serializeDocumentsForAgent, splitResponse, sseToText, toAsyncIterable, toJuneError, updateDocumentInProgram, useDocumentBridge, useDocumentEditorConfig, useDocumentOptions, useJuneRuntime, useJuneStream, useJuneTheme, useRegistryLibrary, useResolvedTheme, useToolApproval, validateComponentDefinition, withDocumentEditor, withRetryNotice, withToolApprovalCard };
|
package/dist/entry-core.d.ts
CHANGED
|
@@ -769,7 +769,7 @@ declare const JuneDocumentEditorComponent: _openuidev_react_lang.DefinedComponen
|
|
|
769
769
|
"side-panel": "side-panel";
|
|
770
770
|
}>>;
|
|
771
771
|
}, z.core.$strip>>;
|
|
772
|
-
type Extendable = Library & {
|
|
772
|
+
type Extendable$2 = Library & {
|
|
773
773
|
extend: NonNullable<Library["extend"]>;
|
|
774
774
|
};
|
|
775
775
|
/**
|
|
@@ -778,7 +778,7 @@ type Extendable = Library & {
|
|
|
778
778
|
* `util.mergeDefs`, and OpenUI's slot clone calls that, so the slot step is skipped
|
|
779
779
|
* there. The component is still registered and can be rendered.
|
|
780
780
|
*/
|
|
781
|
-
declare function withDocumentEditor(library: Extendable): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
781
|
+
declare function withDocumentEditor(library: Extendable$2): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
782
782
|
|
|
783
783
|
declare const JuneDocumentContext: react.Context<JuneDocumentOptions>;
|
|
784
784
|
/** App-wide `documentEditor` config from JuneUI. Empty when the app did not set one. */
|
|
@@ -949,6 +949,44 @@ interface ToolApprovalProps {
|
|
|
949
949
|
*/
|
|
950
950
|
declare function ToolApproval({ request, status, onDecide, disabled, error, labels: labelOverrides, renderArguments, className, }: ToolApprovalProps): react.JSX.Element;
|
|
951
951
|
|
|
952
|
+
declare const cardProps: z.ZodObject<{
|
|
953
|
+
agent: z.ZodString;
|
|
954
|
+
tool: z.ZodString;
|
|
955
|
+
sideEffect: z.ZodOptional<z.ZodEnum<{
|
|
956
|
+
read: "read";
|
|
957
|
+
write: "write";
|
|
958
|
+
destructive: "destructive";
|
|
959
|
+
}>>;
|
|
960
|
+
risk: z.ZodOptional<z.ZodEnum<{
|
|
961
|
+
medium: "medium";
|
|
962
|
+
high: "high";
|
|
963
|
+
low: "low";
|
|
964
|
+
}>>;
|
|
965
|
+
}, z.core.$strip>;
|
|
966
|
+
type ToolApprovalCardProps = z.infer<typeof cardProps>;
|
|
967
|
+
declare const TOOL_APPROVAL_CARD_DESCRIPTION = "Custom component. Asks the user to approve, reject, or edit a tool call before it runs. ToolApprovalCard(agent, tool, sideEffect?, risk?). Use it when an assistant wants to run a tool that needs the user's decision.";
|
|
968
|
+
/** Approval card the model can place in a response. Buttons fire the existing action pipeline. */
|
|
969
|
+
declare function ToolApprovalCard({ agent, tool, sideEffect, risk }: ToolApprovalCardProps): react.JSX.Element;
|
|
970
|
+
declare const JuneToolApprovalCardComponent: JuneComponent<z.ZodObject<{
|
|
971
|
+
agent: z.ZodString;
|
|
972
|
+
tool: z.ZodString;
|
|
973
|
+
sideEffect: z.ZodOptional<z.ZodEnum<{
|
|
974
|
+
read: "read";
|
|
975
|
+
write: "write";
|
|
976
|
+
destructive: "destructive";
|
|
977
|
+
}>>;
|
|
978
|
+
risk: z.ZodOptional<z.ZodEnum<{
|
|
979
|
+
medium: "medium";
|
|
980
|
+
high: "high";
|
|
981
|
+
low: "low";
|
|
982
|
+
}>>;
|
|
983
|
+
}, z.core.$strip>>;
|
|
984
|
+
type Extendable$1 = Library & {
|
|
985
|
+
extend: NonNullable<Library["extend"]>;
|
|
986
|
+
};
|
|
987
|
+
/** Adds ToolApprovalCard to a library. Card may contain it when slot cloning succeeds. */
|
|
988
|
+
declare function withToolApprovalCard(library: Extendable$1): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
989
|
+
|
|
952
990
|
type ToolApprovalInput = Omit<ToolApprovalRequest, "id"> & {
|
|
953
991
|
id?: string;
|
|
954
992
|
};
|
|
@@ -990,6 +1028,24 @@ interface ToolApprovalListProps {
|
|
|
990
1028
|
/** Renders every request from `useToolApproval()` and wires its buttons. */
|
|
991
1029
|
declare function ToolApprovalList({ approvals, pendingOnly, renderItem, labels, className }: ToolApprovalListProps): react.JSX.Element | null;
|
|
992
1030
|
|
|
1031
|
+
declare const noticeProps: z.ZodObject<{
|
|
1032
|
+
title: z.ZodString;
|
|
1033
|
+
message: z.ZodString;
|
|
1034
|
+
}, z.core.$strip>;
|
|
1035
|
+
type RetryNoticeProps = z.infer<typeof noticeProps>;
|
|
1036
|
+
declare const RETRY_NOTICE_DESCRIPTION = "Custom component. Shows that a response failed and offers Retry. RetryNotice(title, message). Use it when the model or request could not be completed.";
|
|
1037
|
+
/** Failure notice with a Retry button. The click goes through the existing action pipeline as `retry`. */
|
|
1038
|
+
declare function RetryNotice({ title, message }: RetryNoticeProps): react.JSX.Element;
|
|
1039
|
+
declare const JuneRetryNoticeComponent: JuneComponent<z.ZodObject<{
|
|
1040
|
+
title: z.ZodString;
|
|
1041
|
+
message: z.ZodString;
|
|
1042
|
+
}, z.core.$strip>>;
|
|
1043
|
+
type Extendable = Library & {
|
|
1044
|
+
extend: NonNullable<Library["extend"]>;
|
|
1045
|
+
};
|
|
1046
|
+
/** Adds RetryNotice to a library. Card may contain it when slot cloning succeeds. */
|
|
1047
|
+
declare function withRetryNotice(library: Extendable): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
1048
|
+
|
|
993
1049
|
/**
|
|
994
1050
|
* LangGraph adapter: turns a LangGraph run stream (SSE from the LangGraph server API, e.g.
|
|
995
1051
|
* `POST /threads/{thread_id}/runs/stream`) into the plain text June renders.
|
|
@@ -1043,4 +1099,4 @@ declare function readLangGraphInterrupts(data: string, event?: string): unknown[
|
|
|
1043
1099
|
*/
|
|
1044
1100
|
declare function interruptToApprovalRequests(value: unknown, idPrefix?: string): ToolApprovalRequest[];
|
|
1045
1101
|
|
|
1046
|
-
export { ALL_EXPORT_FORMATS, type ActionEventParser, type ActionOutcome, type AnyComponentDefinition, type ApprovalChoice, type ComponentProps, ComponentRegistry, type ComponentRegistryOptions, type ConfirmAction, type ConsumeStreamOptions, DOCUMENT_COMPONENT_DESCRIPTION, type DefineComponentOptions, type DocJSON, type DocNode, DocumentBridge, type DocumentBridgeOptions, type DocumentChange, type DocumentConflict, DocumentEditor, type DocumentEditorConfig, DocumentEditorConfigContext, type DocumentEditorProps, type DocumentExportEvent, type DocumentExportFormat, type DocumentExporter, type DocumentInstructionOptions, type DocumentPresentation, type DocumentProgramUpdate, type DocumentRecord, type DocumentSavePayload, type DocumentSnapshot, type DocumentStore, type ExportContext, type ExportResult, type FallbackArgs, type FetchStreamOptions, type IncomingDocument, type JuneAction, type JuneActionContext, type JuneActionDefinition, type JuneActionMap, type JuneComponent, type JuneComponentMeta, type JuneContextValue, JuneDocumentContext, JuneDocumentEditorComponent, type JuneDocumentOptions, JuneError, JuneErrorBoundary, type JuneErrorBoundaryProps, type JuneErrorCode, type JuneErrorOptions, type JuneLibraryOptions, type JuneRenderProps, JuneRenderer, type JuneRendererProps, type JuneResolvedTheme, JuneRuntimeContext, type JuneRuntimeValue, type JuneStreamState, type JuneThemeInput, type JuneThemeMode, JuneThemeProvider, type JuneThemeProviderProps, type JuneThemeSet, type JuneThemeToken, type JuneThemeVars, type LangGraphExtractorOptions, MarkdownText, type MarkdownTextProps, type MixedContent, type MixedContentOptions, type OpenUIActionEvent, type OpenUILibrary, type OpenUIRendererProps, type ParsedActionEvent, type PendingUpdate, type ReceiveOutcome, type RegisterOptions, type ResolveChoice, type ResponseChangeInfo, type RunActionOptions, type SchemaLike, type SplitOptions, type SplitResponse, type SseOptions, type StreamChunk, type StreamSource, type StreamStarter, type StreamStatus, type TextFormat, ToolApproval, type ToolApprovalDecision, type ToolApprovalEntry, type ToolApprovalInput, type ToolApprovalLabels, ToolApprovalList, type ToolApprovalListProps, type ToolApprovalProps, type ToolApprovalRequest, type ToolApprovalStatus, type UseJuneStreamOptions, type UseJuneStreamResult, type UseToolApprovalResult, consumeStream, copyDocumentToClipboard, createActionHandler, createComponentRegistry, createDocumentStore, createJuneLibrary, createLangGraphExtractor, createTheme, darkTheme, defaultParseActionEvent, defaultToolApprovalLabels, defineComponent, defineJuneAction, defineJuneComponent, documentPanelWidth, documentPromptOptions, downloadResult, exportDocument, fetchStream, getDefaultDocumentStore, getDocumentEditorInstructions, getDocumentEditorRules, interruptToApprovalRequests, isDocumentEcho, isJuneComponent, isJuneError, isThemeSet, jsonFieldExtractor, langGraphStreamOptions, lightTheme, listDocumentExporters, mergeDocuments, messageContentToText, normalizeProgram, readDocumentFromProgram, readLangGraphInterrupts, registerDocumentExporter, rememberDocumentEcho, resolveDocumentPresentation, resolveMixedContent, resolveThemeVars, runAction, serializeDocumentsForAgent, splitResponse, sseToText, toAsyncIterable, toJuneError, updateDocumentInProgram, useDocumentBridge, useDocumentEditorConfig, useDocumentOptions, useJuneRuntime, useJuneStream, useJuneTheme, useRegistryLibrary, useResolvedTheme, useToolApproval, validateComponentDefinition, withDocumentEditor };
|
|
1102
|
+
export { ALL_EXPORT_FORMATS, type ActionEventParser, type ActionOutcome, type AnyComponentDefinition, type ApprovalChoice, type ComponentProps, ComponentRegistry, type ComponentRegistryOptions, type ConfirmAction, type ConsumeStreamOptions, DOCUMENT_COMPONENT_DESCRIPTION, type DefineComponentOptions, type DocJSON, type DocNode, DocumentBridge, type DocumentBridgeOptions, type DocumentChange, type DocumentConflict, DocumentEditor, type DocumentEditorConfig, DocumentEditorConfigContext, type DocumentEditorProps, type DocumentExportEvent, type DocumentExportFormat, type DocumentExporter, type DocumentInstructionOptions, type DocumentPresentation, type DocumentProgramUpdate, type DocumentRecord, type DocumentSavePayload, type DocumentSnapshot, type DocumentStore, type ExportContext, type ExportResult, type FallbackArgs, type FetchStreamOptions, type IncomingDocument, type JuneAction, type JuneActionContext, type JuneActionDefinition, type JuneActionMap, type JuneComponent, type JuneComponentMeta, type JuneContextValue, JuneDocumentContext, JuneDocumentEditorComponent, type JuneDocumentOptions, JuneError, JuneErrorBoundary, type JuneErrorBoundaryProps, type JuneErrorCode, type JuneErrorOptions, type JuneLibraryOptions, type JuneRenderProps, JuneRenderer, type JuneRendererProps, type JuneResolvedTheme, JuneRetryNoticeComponent, JuneRuntimeContext, type JuneRuntimeValue, type JuneStreamState, type JuneThemeInput, type JuneThemeMode, JuneThemeProvider, type JuneThemeProviderProps, type JuneThemeSet, type JuneThemeToken, type JuneThemeVars, JuneToolApprovalCardComponent, type LangGraphExtractorOptions, MarkdownText, type MarkdownTextProps, type MixedContent, type MixedContentOptions, type OpenUIActionEvent, type OpenUILibrary, type OpenUIRendererProps, type ParsedActionEvent, type PendingUpdate, RETRY_NOTICE_DESCRIPTION, type ReceiveOutcome, type RegisterOptions, type ResolveChoice, type ResponseChangeInfo, RetryNotice, type RetryNoticeProps, type RunActionOptions, type SchemaLike, type SplitOptions, type SplitResponse, type SseOptions, type StreamChunk, type StreamSource, type StreamStarter, type StreamStatus, TOOL_APPROVAL_CARD_DESCRIPTION, type TextFormat, ToolApproval, ToolApprovalCard, type ToolApprovalCardProps, type ToolApprovalDecision, type ToolApprovalEntry, type ToolApprovalInput, type ToolApprovalLabels, ToolApprovalList, type ToolApprovalListProps, type ToolApprovalProps, type ToolApprovalRequest, type ToolApprovalStatus, type UseJuneStreamOptions, type UseJuneStreamResult, type UseToolApprovalResult, consumeStream, copyDocumentToClipboard, createActionHandler, createComponentRegistry, createDocumentStore, createJuneLibrary, createLangGraphExtractor, createTheme, darkTheme, defaultParseActionEvent, defaultToolApprovalLabels, defineComponent, defineJuneAction, defineJuneComponent, documentPanelWidth, documentPromptOptions, downloadResult, exportDocument, fetchStream, getDefaultDocumentStore, getDocumentEditorInstructions, getDocumentEditorRules, interruptToApprovalRequests, isDocumentEcho, isJuneComponent, isJuneError, isThemeSet, jsonFieldExtractor, langGraphStreamOptions, lightTheme, listDocumentExporters, mergeDocuments, messageContentToText, normalizeProgram, readDocumentFromProgram, readLangGraphInterrupts, registerDocumentExporter, rememberDocumentEcho, resolveDocumentPresentation, resolveMixedContent, resolveThemeVars, runAction, serializeDocumentsForAgent, splitResponse, sseToText, toAsyncIterable, toJuneError, updateDocumentInProgram, useDocumentBridge, useDocumentEditorConfig, useDocumentOptions, useJuneRuntime, useJuneStream, useJuneTheme, useRegistryLibrary, useResolvedTheme, useToolApproval, validateComponentDefinition, withDocumentEditor, withRetryNotice, withToolApprovalCard };
|
package/dist/entry-core.js
CHANGED
|
@@ -10,10 +10,16 @@ import {
|
|
|
10
10
|
JuneDocumentEditorComponent,
|
|
11
11
|
JuneErrorBoundary,
|
|
12
12
|
JuneRenderer,
|
|
13
|
+
JuneRetryNoticeComponent,
|
|
13
14
|
JuneRuntimeContext,
|
|
14
15
|
JuneThemeProvider,
|
|
16
|
+
JuneToolApprovalCardComponent,
|
|
15
17
|
MarkdownText,
|
|
18
|
+
RETRY_NOTICE_DESCRIPTION,
|
|
19
|
+
RetryNotice,
|
|
20
|
+
TOOL_APPROVAL_CARD_DESCRIPTION,
|
|
16
21
|
ToolApproval,
|
|
22
|
+
ToolApprovalCard,
|
|
17
23
|
ToolApprovalList,
|
|
18
24
|
consumeStream,
|
|
19
25
|
copyDocumentToClipboard,
|
|
@@ -71,8 +77,10 @@ import {
|
|
|
71
77
|
useResolvedTheme,
|
|
72
78
|
useToolApproval,
|
|
73
79
|
validateComponentDefinition,
|
|
74
|
-
withDocumentEditor
|
|
75
|
-
|
|
80
|
+
withDocumentEditor,
|
|
81
|
+
withRetryNotice,
|
|
82
|
+
withToolApprovalCard
|
|
83
|
+
} from "./chunk-SZ47R4Z5.js";
|
|
76
84
|
import {
|
|
77
85
|
JuneError,
|
|
78
86
|
isJuneError,
|
|
@@ -90,10 +98,16 @@ export {
|
|
|
90
98
|
JuneError,
|
|
91
99
|
JuneErrorBoundary,
|
|
92
100
|
JuneRenderer,
|
|
101
|
+
JuneRetryNoticeComponent,
|
|
93
102
|
JuneRuntimeContext,
|
|
94
103
|
JuneThemeProvider,
|
|
104
|
+
JuneToolApprovalCardComponent,
|
|
95
105
|
MarkdownText,
|
|
106
|
+
RETRY_NOTICE_DESCRIPTION,
|
|
107
|
+
RetryNotice,
|
|
108
|
+
TOOL_APPROVAL_CARD_DESCRIPTION,
|
|
96
109
|
ToolApproval,
|
|
110
|
+
ToolApprovalCard,
|
|
97
111
|
ToolApprovalList,
|
|
98
112
|
consumeStream,
|
|
99
113
|
copyDocumentToClipboard,
|
|
@@ -153,5 +167,7 @@ export {
|
|
|
153
167
|
useResolvedTheme,
|
|
154
168
|
useToolApproval,
|
|
155
169
|
validateComponentDefinition,
|
|
156
|
-
withDocumentEditor
|
|
170
|
+
withDocumentEditor,
|
|
171
|
+
withRetryNotice,
|
|
172
|
+
withToolApprovalCard
|
|
157
173
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -71,7 +71,15 @@
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
var _chunkNMTAZCQDcjs = require('./chunk-NMTAZCQD.cjs');
|
|
75
83
|
|
|
76
84
|
|
|
77
85
|
|
|
@@ -107,8 +115,10 @@ function withChatLayout(library) {
|
|
|
107
115
|
}
|
|
108
116
|
});
|
|
109
117
|
}
|
|
110
|
-
var juneLibrary =
|
|
111
|
-
|
|
118
|
+
var juneLibrary = _chunkNMTAZCQDcjs.withRetryNotice.call(void 0,
|
|
119
|
+
_chunkNMTAZCQDcjs.withToolApprovalCard.call(void 0, _chunkNMTAZCQDcjs.withDocumentEditor.call(void 0, withChatLayout(_reactui.openuiChatLibrary)))
|
|
120
|
+
);
|
|
121
|
+
var defaultRegistry = _chunkNMTAZCQDcjs.createComponentRegistry.call(void 0, { base: juneLibrary });
|
|
112
122
|
function registerComponent(components, options) {
|
|
113
123
|
return defaultRegistry.register(components, options);
|
|
114
124
|
}
|
|
@@ -133,14 +143,14 @@ function useJuneUIContext() {
|
|
|
133
143
|
function JuneUI({ library, june, ...props }) {
|
|
134
144
|
const context = useJuneUIContext();
|
|
135
145
|
const instance = _nullishCoalesce(june, () => ( _optionalChain([context, 'optionalAccess', _ => _.june])));
|
|
136
|
-
const registryLibrary =
|
|
146
|
+
const registryLibrary = _chunkNMTAZCQDcjs.useRegistryLibrary.call(void 0, _nullishCoalesce(_optionalChain([instance, 'optionalAccess', _2 => _2.registry]), () => ( defaultRegistry)));
|
|
137
147
|
const merged = mergeDefined(_optionalChain([instance, 'optionalAccess', _3 => _3.defaults]), _optionalChain([context, 'optionalAccess', _4 => _4.defaults]), props);
|
|
138
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
148
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNMTAZCQDcjs.JuneRenderer, { ...merged, library: _nullishCoalesce(library, () => ( registryLibrary)) });
|
|
139
149
|
}
|
|
140
150
|
|
|
141
151
|
// src/core/create-june-ui.ts
|
|
142
152
|
function createJuneUI(options = {}) {
|
|
143
|
-
const registry =
|
|
153
|
+
const registry = _chunkNMTAZCQDcjs.createComponentRegistry.call(void 0, {
|
|
144
154
|
base: _nullishCoalesce(options.baseLibrary, () => ( juneLibrary)),
|
|
145
155
|
components: options.components,
|
|
146
156
|
overrides: options.overrides,
|
|
@@ -245,4 +255,12 @@ function createJuneUI(options = {}) {
|
|
|
245
255
|
|
|
246
256
|
|
|
247
257
|
|
|
248
|
-
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
exports.ALL_EXPORT_FORMATS = _chunkNMTAZCQDcjs.ALL_EXPORT_FORMATS; exports.ComponentRegistry = _chunkNMTAZCQDcjs.ComponentRegistry; exports.DOCUMENT_COMPONENT_DESCRIPTION = _chunkNMTAZCQDcjs.DOCUMENT_COMPONENT_DESCRIPTION; exports.DocumentBridge = _chunkNMTAZCQDcjs.DocumentBridge; exports.DocumentEditor = _chunkNMTAZCQDcjs.DocumentEditor; exports.DocumentEditorConfigContext = _chunkNMTAZCQDcjs.DocumentEditorConfigContext; exports.JuneDocumentContext = _chunkNMTAZCQDcjs.JuneDocumentContext; exports.JuneDocumentEditorComponent = _chunkNMTAZCQDcjs.JuneDocumentEditorComponent; exports.JuneError = _chunkG6YPSE6Jcjs.JuneError; exports.JuneErrorBoundary = _chunkNMTAZCQDcjs.JuneErrorBoundary; exports.JuneRenderer = _chunkNMTAZCQDcjs.JuneRenderer; exports.JuneRetryNoticeComponent = _chunkNMTAZCQDcjs.JuneRetryNoticeComponent; exports.JuneRuntimeContext = _chunkNMTAZCQDcjs.JuneRuntimeContext; exports.JuneThemeProvider = _chunkNMTAZCQDcjs.JuneThemeProvider; exports.JuneToolApprovalCardComponent = _chunkNMTAZCQDcjs.JuneToolApprovalCardComponent; exports.JuneUI = JuneUI; exports.JuneUIProvider = JuneUIProvider; exports.MarkdownText = _chunkNMTAZCQDcjs.MarkdownText; exports.RETRY_NOTICE_DESCRIPTION = _chunkNMTAZCQDcjs.RETRY_NOTICE_DESCRIPTION; exports.RetryNotice = _chunkNMTAZCQDcjs.RetryNotice; exports.TOOL_APPROVAL_CARD_DESCRIPTION = _chunkNMTAZCQDcjs.TOOL_APPROVAL_CARD_DESCRIPTION; exports.ToolApproval = _chunkNMTAZCQDcjs.ToolApproval; exports.ToolApprovalCard = _chunkNMTAZCQDcjs.ToolApprovalCard; exports.ToolApprovalList = _chunkNMTAZCQDcjs.ToolApprovalList; exports.consumeStream = _chunkNMTAZCQDcjs.consumeStream; exports.copyDocumentToClipboard = _chunkNMTAZCQDcjs.copyDocumentToClipboard; exports.createActionHandler = _chunkNMTAZCQDcjs.createActionHandler; exports.createComponentRegistry = _chunkNMTAZCQDcjs.createComponentRegistry; exports.createDocumentStore = _chunkNMTAZCQDcjs.createDocumentStore; exports.createJuneLibrary = _chunkNMTAZCQDcjs.createJuneLibrary; exports.createJuneUI = createJuneUI; exports.createLangGraphExtractor = _chunkNMTAZCQDcjs.createLangGraphExtractor; exports.createTheme = _chunkNMTAZCQDcjs.createTheme; exports.darkTheme = _chunkNMTAZCQDcjs.darkTheme; exports.defaultParseActionEvent = _chunkNMTAZCQDcjs.defaultParseActionEvent; exports.defaultRegistry = defaultRegistry; exports.defaultToolApprovalLabels = _chunkNMTAZCQDcjs.defaultToolApprovalLabels; exports.defineComponent = _chunkNMTAZCQDcjs.defineComponent; exports.defineJuneAction = _chunkNMTAZCQDcjs.defineJuneAction; exports.defineJuneComponent = _chunkNMTAZCQDcjs.defineJuneComponent; exports.documentPanelWidth = _chunkNMTAZCQDcjs.documentPanelWidth; exports.documentPromptOptions = _chunkNMTAZCQDcjs.documentPromptOptions; exports.downloadResult = _chunkNMTAZCQDcjs.downloadResult; exports.exportDocument = _chunkNMTAZCQDcjs.exportDocument; exports.fetchStream = _chunkNMTAZCQDcjs.fetchStream; exports.getDefaultDocumentStore = _chunkNMTAZCQDcjs.getDefaultDocumentStore; exports.getDocumentEditorInstructions = _chunkNMTAZCQDcjs.getDocumentEditorInstructions; exports.getDocumentEditorRules = _chunkNMTAZCQDcjs.getDocumentEditorRules; exports.interruptToApprovalRequests = _chunkNMTAZCQDcjs.interruptToApprovalRequests; exports.isDocumentEcho = _chunkNMTAZCQDcjs.isDocumentEcho; exports.isJuneComponent = _chunkNMTAZCQDcjs.isJuneComponent; exports.isJuneError = _chunkG6YPSE6Jcjs.isJuneError; exports.isThemeSet = _chunkNMTAZCQDcjs.isThemeSet; exports.jsonFieldExtractor = _chunkNMTAZCQDcjs.jsonFieldExtractor; exports.juneLibrary = juneLibrary; exports.langGraphStreamOptions = _chunkNMTAZCQDcjs.langGraphStreamOptions; exports.lightTheme = _chunkNMTAZCQDcjs.lightTheme; exports.listDocumentExporters = _chunkNMTAZCQDcjs.listDocumentExporters; exports.mergeDocuments = _chunkNMTAZCQDcjs.mergeDocuments; exports.messageContentToText = _chunkNMTAZCQDcjs.messageContentToText; exports.normalizeProgram = _chunkNMTAZCQDcjs.normalizeProgram; exports.readDocumentFromProgram = _chunkNMTAZCQDcjs.readDocumentFromProgram; exports.readLangGraphInterrupts = _chunkNMTAZCQDcjs.readLangGraphInterrupts; exports.registerComponent = registerComponent; exports.registerDocumentExporter = _chunkNMTAZCQDcjs.registerDocumentExporter; exports.rememberDocumentEcho = _chunkNMTAZCQDcjs.rememberDocumentEcho; exports.resolveDocumentPresentation = _chunkNMTAZCQDcjs.resolveDocumentPresentation; exports.resolveMixedContent = _chunkNMTAZCQDcjs.resolveMixedContent; exports.resolveThemeVars = _chunkNMTAZCQDcjs.resolveThemeVars; exports.runAction = _chunkNMTAZCQDcjs.runAction; exports.serializeDocumentsForAgent = _chunkNMTAZCQDcjs.serializeDocumentsForAgent; exports.splitResponse = _chunkNMTAZCQDcjs.splitResponse; exports.sseToText = _chunkNMTAZCQDcjs.sseToText; exports.toAsyncIterable = _chunkNMTAZCQDcjs.toAsyncIterable; exports.toJuneError = _chunkG6YPSE6Jcjs.toJuneError; exports.unregisterComponent = unregisterComponent; exports.updateDocumentInProgram = _chunkNMTAZCQDcjs.updateDocumentInProgram; exports.useDocumentBridge = _chunkNMTAZCQDcjs.useDocumentBridge; exports.useDocumentEditorConfig = _chunkNMTAZCQDcjs.useDocumentEditorConfig; exports.useDocumentOptions = _chunkNMTAZCQDcjs.useDocumentOptions; exports.useJuneRuntime = _chunkNMTAZCQDcjs.useJuneRuntime; exports.useJuneStream = _chunkNMTAZCQDcjs.useJuneStream; exports.useJuneTheme = _chunkNMTAZCQDcjs.useJuneTheme; exports.useJuneUIContext = useJuneUIContext; exports.useRegistryLibrary = _chunkNMTAZCQDcjs.useRegistryLibrary; exports.useResolvedTheme = _chunkNMTAZCQDcjs.useResolvedTheme; exports.useToolApproval = _chunkNMTAZCQDcjs.useToolApproval; exports.validateComponentDefinition = _chunkNMTAZCQDcjs.validateComponentDefinition; exports.withDocumentEditor = _chunkNMTAZCQDcjs.withDocumentEditor; exports.withRetryNotice = _chunkNMTAZCQDcjs.withRetryNotice; exports.withToolApprovalCard = _chunkNMTAZCQDcjs.withToolApprovalCard;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JuneRendererProps, AnyComponentDefinition, OpenUILibrary, ComponentRegistry, RegisterOptions } from './entry-core.cjs';
|
|
2
|
-
export { ALL_EXPORT_FORMATS, ActionEventParser, ActionOutcome, ApprovalChoice, ComponentProps, ComponentRegistryOptions, ConfirmAction, ConsumeStreamOptions, DOCUMENT_COMPONENT_DESCRIPTION, DefineComponentOptions, DocJSON, DocNode, DocumentBridge, DocumentBridgeOptions, DocumentChange, DocumentConflict, DocumentEditor, DocumentEditorConfig, DocumentEditorConfigContext, DocumentEditorProps, DocumentExportEvent, DocumentExportFormat, DocumentExporter, DocumentInstructionOptions, DocumentPresentation, DocumentProgramUpdate, DocumentRecord, DocumentSavePayload, DocumentSnapshot, DocumentStore, ExportContext, ExportResult, FallbackArgs, FetchStreamOptions, IncomingDocument, JuneAction, JuneActionContext, JuneActionDefinition, JuneActionMap, JuneComponent, JuneComponentMeta, JuneContextValue, JuneDocumentContext, JuneDocumentEditorComponent, JuneDocumentOptions, JuneError, JuneErrorBoundary, JuneErrorBoundaryProps, JuneErrorCode, JuneErrorOptions, JuneLibraryOptions, JuneRenderProps, JuneRenderer, JuneResolvedTheme, JuneRuntimeContext, JuneRuntimeValue, JuneStreamState, JuneThemeInput, JuneThemeMode, JuneThemeProvider, JuneThemeProviderProps, JuneThemeSet, JuneThemeToken, JuneThemeVars, LangGraphExtractorOptions, MarkdownText, MarkdownTextProps, MixedContent, MixedContentOptions, OpenUIActionEvent, OpenUIRendererProps, ParsedActionEvent, PendingUpdate, ReceiveOutcome, ResolveChoice, ResponseChangeInfo, RunActionOptions, SchemaLike, SplitOptions, SplitResponse, SseOptions, StreamChunk, StreamSource, StreamStarter, StreamStatus, TextFormat, ToolApproval, ToolApprovalDecision, ToolApprovalEntry, ToolApprovalInput, ToolApprovalLabels, ToolApprovalList, ToolApprovalListProps, ToolApprovalProps, ToolApprovalRequest, ToolApprovalStatus, UseJuneStreamOptions, UseJuneStreamResult, UseToolApprovalResult, consumeStream, copyDocumentToClipboard, createActionHandler, createComponentRegistry, createDocumentStore, createJuneLibrary, createLangGraphExtractor, createTheme, darkTheme, defaultParseActionEvent, defaultToolApprovalLabels, defineComponent, defineJuneAction, defineJuneComponent, documentPanelWidth, documentPromptOptions, downloadResult, exportDocument, fetchStream, getDefaultDocumentStore, getDocumentEditorInstructions, getDocumentEditorRules, interruptToApprovalRequests, isDocumentEcho, isJuneComponent, isJuneError, isThemeSet, jsonFieldExtractor, langGraphStreamOptions, lightTheme, listDocumentExporters, mergeDocuments, messageContentToText, normalizeProgram, readDocumentFromProgram, readLangGraphInterrupts, registerDocumentExporter, rememberDocumentEcho, resolveDocumentPresentation, resolveMixedContent, resolveThemeVars, runAction, serializeDocumentsForAgent, splitResponse, sseToText, toAsyncIterable, toJuneError, updateDocumentInProgram, useDocumentBridge, useDocumentEditorConfig, useDocumentOptions, useJuneRuntime, useJuneStream, useJuneTheme, useRegistryLibrary, useResolvedTheme, useToolApproval, validateComponentDefinition, withDocumentEditor } from './entry-core.cjs';
|
|
2
|
+
export { ALL_EXPORT_FORMATS, ActionEventParser, ActionOutcome, ApprovalChoice, ComponentProps, ComponentRegistryOptions, ConfirmAction, ConsumeStreamOptions, DOCUMENT_COMPONENT_DESCRIPTION, DefineComponentOptions, DocJSON, DocNode, DocumentBridge, DocumentBridgeOptions, DocumentChange, DocumentConflict, DocumentEditor, DocumentEditorConfig, DocumentEditorConfigContext, DocumentEditorProps, DocumentExportEvent, DocumentExportFormat, DocumentExporter, DocumentInstructionOptions, DocumentPresentation, DocumentProgramUpdate, DocumentRecord, DocumentSavePayload, DocumentSnapshot, DocumentStore, ExportContext, ExportResult, FallbackArgs, FetchStreamOptions, IncomingDocument, JuneAction, JuneActionContext, JuneActionDefinition, JuneActionMap, JuneComponent, JuneComponentMeta, JuneContextValue, JuneDocumentContext, JuneDocumentEditorComponent, JuneDocumentOptions, JuneError, JuneErrorBoundary, JuneErrorBoundaryProps, JuneErrorCode, JuneErrorOptions, JuneLibraryOptions, JuneRenderProps, JuneRenderer, JuneResolvedTheme, JuneRetryNoticeComponent, JuneRuntimeContext, JuneRuntimeValue, JuneStreamState, JuneThemeInput, JuneThemeMode, JuneThemeProvider, JuneThemeProviderProps, JuneThemeSet, JuneThemeToken, JuneThemeVars, JuneToolApprovalCardComponent, LangGraphExtractorOptions, MarkdownText, MarkdownTextProps, MixedContent, MixedContentOptions, OpenUIActionEvent, OpenUIRendererProps, ParsedActionEvent, PendingUpdate, RETRY_NOTICE_DESCRIPTION, ReceiveOutcome, ResolveChoice, ResponseChangeInfo, RetryNotice, RetryNoticeProps, RunActionOptions, SchemaLike, SplitOptions, SplitResponse, SseOptions, StreamChunk, StreamSource, StreamStarter, StreamStatus, TOOL_APPROVAL_CARD_DESCRIPTION, TextFormat, ToolApproval, ToolApprovalCard, ToolApprovalCardProps, ToolApprovalDecision, ToolApprovalEntry, ToolApprovalInput, ToolApprovalLabels, ToolApprovalList, ToolApprovalListProps, ToolApprovalProps, ToolApprovalRequest, ToolApprovalStatus, UseJuneStreamOptions, UseJuneStreamResult, UseToolApprovalResult, consumeStream, copyDocumentToClipboard, createActionHandler, createComponentRegistry, createDocumentStore, createJuneLibrary, createLangGraphExtractor, createTheme, darkTheme, defaultParseActionEvent, defaultToolApprovalLabels, defineComponent, defineJuneAction, defineJuneComponent, documentPanelWidth, documentPromptOptions, downloadResult, exportDocument, fetchStream, getDefaultDocumentStore, getDocumentEditorInstructions, getDocumentEditorRules, interruptToApprovalRequests, isDocumentEcho, isJuneComponent, isJuneError, isThemeSet, jsonFieldExtractor, langGraphStreamOptions, lightTheme, listDocumentExporters, mergeDocuments, messageContentToText, normalizeProgram, readDocumentFromProgram, readLangGraphInterrupts, registerDocumentExporter, rememberDocumentEcho, resolveDocumentPresentation, resolveMixedContent, resolveThemeVars, runAction, serializeDocumentsForAgent, splitResponse, sseToText, toAsyncIterable, toJuneError, updateDocumentInProgram, useDocumentBridge, useDocumentEditorConfig, useDocumentOptions, useJuneRuntime, useJuneStream, useJuneTheme, useRegistryLibrary, useResolvedTheme, useToolApproval, validateComponentDefinition, withDocumentEditor, withRetryNotice, withToolApprovalCard } from './entry-core.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { PromptOptions } from '@openuidev/react-lang';
|
|
@@ -79,8 +79,9 @@ declare function JuneUIProvider({ june, defaults, children }: JuneUIProviderProp
|
|
|
79
79
|
declare function useJuneUIContext(): JuneUIContextValue | null;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* June's default library: the OpenUI chat library, plus Stack, Modal
|
|
83
|
-
* Root is Card, matching the chat language.
|
|
82
|
+
* June's default library: the OpenUI chat library, plus Stack, Modal, DocumentEditor,
|
|
83
|
+
* ToolApprovalCard and RetryNotice. Root is Card, matching the chat language.
|
|
84
|
+
* Created once so its reference stays stable.
|
|
84
85
|
*/
|
|
85
86
|
declare const juneLibrary: OpenUILibrary;
|
|
86
87
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JuneRendererProps, AnyComponentDefinition, OpenUILibrary, ComponentRegistry, RegisterOptions } from './entry-core.js';
|
|
2
|
-
export { ALL_EXPORT_FORMATS, ActionEventParser, ActionOutcome, ApprovalChoice, ComponentProps, ComponentRegistryOptions, ConfirmAction, ConsumeStreamOptions, DOCUMENT_COMPONENT_DESCRIPTION, DefineComponentOptions, DocJSON, DocNode, DocumentBridge, DocumentBridgeOptions, DocumentChange, DocumentConflict, DocumentEditor, DocumentEditorConfig, DocumentEditorConfigContext, DocumentEditorProps, DocumentExportEvent, DocumentExportFormat, DocumentExporter, DocumentInstructionOptions, DocumentPresentation, DocumentProgramUpdate, DocumentRecord, DocumentSavePayload, DocumentSnapshot, DocumentStore, ExportContext, ExportResult, FallbackArgs, FetchStreamOptions, IncomingDocument, JuneAction, JuneActionContext, JuneActionDefinition, JuneActionMap, JuneComponent, JuneComponentMeta, JuneContextValue, JuneDocumentContext, JuneDocumentEditorComponent, JuneDocumentOptions, JuneError, JuneErrorBoundary, JuneErrorBoundaryProps, JuneErrorCode, JuneErrorOptions, JuneLibraryOptions, JuneRenderProps, JuneRenderer, JuneResolvedTheme, JuneRuntimeContext, JuneRuntimeValue, JuneStreamState, JuneThemeInput, JuneThemeMode, JuneThemeProvider, JuneThemeProviderProps, JuneThemeSet, JuneThemeToken, JuneThemeVars, LangGraphExtractorOptions, MarkdownText, MarkdownTextProps, MixedContent, MixedContentOptions, OpenUIActionEvent, OpenUIRendererProps, ParsedActionEvent, PendingUpdate, ReceiveOutcome, ResolveChoice, ResponseChangeInfo, RunActionOptions, SchemaLike, SplitOptions, SplitResponse, SseOptions, StreamChunk, StreamSource, StreamStarter, StreamStatus, TextFormat, ToolApproval, ToolApprovalDecision, ToolApprovalEntry, ToolApprovalInput, ToolApprovalLabels, ToolApprovalList, ToolApprovalListProps, ToolApprovalProps, ToolApprovalRequest, ToolApprovalStatus, UseJuneStreamOptions, UseJuneStreamResult, UseToolApprovalResult, consumeStream, copyDocumentToClipboard, createActionHandler, createComponentRegistry, createDocumentStore, createJuneLibrary, createLangGraphExtractor, createTheme, darkTheme, defaultParseActionEvent, defaultToolApprovalLabels, defineComponent, defineJuneAction, defineJuneComponent, documentPanelWidth, documentPromptOptions, downloadResult, exportDocument, fetchStream, getDefaultDocumentStore, getDocumentEditorInstructions, getDocumentEditorRules, interruptToApprovalRequests, isDocumentEcho, isJuneComponent, isJuneError, isThemeSet, jsonFieldExtractor, langGraphStreamOptions, lightTheme, listDocumentExporters, mergeDocuments, messageContentToText, normalizeProgram, readDocumentFromProgram, readLangGraphInterrupts, registerDocumentExporter, rememberDocumentEcho, resolveDocumentPresentation, resolveMixedContent, resolveThemeVars, runAction, serializeDocumentsForAgent, splitResponse, sseToText, toAsyncIterable, toJuneError, updateDocumentInProgram, useDocumentBridge, useDocumentEditorConfig, useDocumentOptions, useJuneRuntime, useJuneStream, useJuneTheme, useRegistryLibrary, useResolvedTheme, useToolApproval, validateComponentDefinition, withDocumentEditor } from './entry-core.js';
|
|
2
|
+
export { ALL_EXPORT_FORMATS, ActionEventParser, ActionOutcome, ApprovalChoice, ComponentProps, ComponentRegistryOptions, ConfirmAction, ConsumeStreamOptions, DOCUMENT_COMPONENT_DESCRIPTION, DefineComponentOptions, DocJSON, DocNode, DocumentBridge, DocumentBridgeOptions, DocumentChange, DocumentConflict, DocumentEditor, DocumentEditorConfig, DocumentEditorConfigContext, DocumentEditorProps, DocumentExportEvent, DocumentExportFormat, DocumentExporter, DocumentInstructionOptions, DocumentPresentation, DocumentProgramUpdate, DocumentRecord, DocumentSavePayload, DocumentSnapshot, DocumentStore, ExportContext, ExportResult, FallbackArgs, FetchStreamOptions, IncomingDocument, JuneAction, JuneActionContext, JuneActionDefinition, JuneActionMap, JuneComponent, JuneComponentMeta, JuneContextValue, JuneDocumentContext, JuneDocumentEditorComponent, JuneDocumentOptions, JuneError, JuneErrorBoundary, JuneErrorBoundaryProps, JuneErrorCode, JuneErrorOptions, JuneLibraryOptions, JuneRenderProps, JuneRenderer, JuneResolvedTheme, JuneRetryNoticeComponent, JuneRuntimeContext, JuneRuntimeValue, JuneStreamState, JuneThemeInput, JuneThemeMode, JuneThemeProvider, JuneThemeProviderProps, JuneThemeSet, JuneThemeToken, JuneThemeVars, JuneToolApprovalCardComponent, LangGraphExtractorOptions, MarkdownText, MarkdownTextProps, MixedContent, MixedContentOptions, OpenUIActionEvent, OpenUIRendererProps, ParsedActionEvent, PendingUpdate, RETRY_NOTICE_DESCRIPTION, ReceiveOutcome, ResolveChoice, ResponseChangeInfo, RetryNotice, RetryNoticeProps, RunActionOptions, SchemaLike, SplitOptions, SplitResponse, SseOptions, StreamChunk, StreamSource, StreamStarter, StreamStatus, TOOL_APPROVAL_CARD_DESCRIPTION, TextFormat, ToolApproval, ToolApprovalCard, ToolApprovalCardProps, ToolApprovalDecision, ToolApprovalEntry, ToolApprovalInput, ToolApprovalLabels, ToolApprovalList, ToolApprovalListProps, ToolApprovalProps, ToolApprovalRequest, ToolApprovalStatus, UseJuneStreamOptions, UseJuneStreamResult, UseToolApprovalResult, consumeStream, copyDocumentToClipboard, createActionHandler, createComponentRegistry, createDocumentStore, createJuneLibrary, createLangGraphExtractor, createTheme, darkTheme, defaultParseActionEvent, defaultToolApprovalLabels, defineComponent, defineJuneAction, defineJuneComponent, documentPanelWidth, documentPromptOptions, downloadResult, exportDocument, fetchStream, getDefaultDocumentStore, getDocumentEditorInstructions, getDocumentEditorRules, interruptToApprovalRequests, isDocumentEcho, isJuneComponent, isJuneError, isThemeSet, jsonFieldExtractor, langGraphStreamOptions, lightTheme, listDocumentExporters, mergeDocuments, messageContentToText, normalizeProgram, readDocumentFromProgram, readLangGraphInterrupts, registerDocumentExporter, rememberDocumentEcho, resolveDocumentPresentation, resolveMixedContent, resolveThemeVars, runAction, serializeDocumentsForAgent, splitResponse, sseToText, toAsyncIterable, toJuneError, updateDocumentInProgram, useDocumentBridge, useDocumentEditorConfig, useDocumentOptions, useJuneRuntime, useJuneStream, useJuneTheme, useRegistryLibrary, useResolvedTheme, useToolApproval, validateComponentDefinition, withDocumentEditor, withRetryNotice, withToolApprovalCard } from './entry-core.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { PromptOptions } from '@openuidev/react-lang';
|
|
@@ -79,8 +79,9 @@ declare function JuneUIProvider({ june, defaults, children }: JuneUIProviderProp
|
|
|
79
79
|
declare function useJuneUIContext(): JuneUIContextValue | null;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* June's default library: the OpenUI chat library, plus Stack, Modal
|
|
83
|
-
* Root is Card, matching the chat language.
|
|
82
|
+
* June's default library: the OpenUI chat library, plus Stack, Modal, DocumentEditor,
|
|
83
|
+
* ToolApprovalCard and RetryNotice. Root is Card, matching the chat language.
|
|
84
|
+
* Created once so its reference stays stable.
|
|
84
85
|
*/
|
|
85
86
|
declare const juneLibrary: OpenUILibrary;
|
|
86
87
|
/**
|
package/dist/index.js
CHANGED
|
@@ -10,10 +10,16 @@ import {
|
|
|
10
10
|
JuneDocumentEditorComponent,
|
|
11
11
|
JuneErrorBoundary,
|
|
12
12
|
JuneRenderer,
|
|
13
|
+
JuneRetryNoticeComponent,
|
|
13
14
|
JuneRuntimeContext,
|
|
14
15
|
JuneThemeProvider,
|
|
16
|
+
JuneToolApprovalCardComponent,
|
|
15
17
|
MarkdownText,
|
|
18
|
+
RETRY_NOTICE_DESCRIPTION,
|
|
19
|
+
RetryNotice,
|
|
20
|
+
TOOL_APPROVAL_CARD_DESCRIPTION,
|
|
16
21
|
ToolApproval,
|
|
22
|
+
ToolApprovalCard,
|
|
17
23
|
ToolApprovalList,
|
|
18
24
|
consumeStream,
|
|
19
25
|
copyDocumentToClipboard,
|
|
@@ -71,8 +77,10 @@ import {
|
|
|
71
77
|
useResolvedTheme,
|
|
72
78
|
useToolApproval,
|
|
73
79
|
validateComponentDefinition,
|
|
74
|
-
withDocumentEditor
|
|
75
|
-
|
|
80
|
+
withDocumentEditor,
|
|
81
|
+
withRetryNotice,
|
|
82
|
+
withToolApprovalCard
|
|
83
|
+
} from "./chunk-SZ47R4Z5.js";
|
|
76
84
|
import {
|
|
77
85
|
JuneError,
|
|
78
86
|
isJuneError,
|
|
@@ -108,7 +116,9 @@ function withChatLayout(library) {
|
|
|
108
116
|
}
|
|
109
117
|
});
|
|
110
118
|
}
|
|
111
|
-
var juneLibrary =
|
|
119
|
+
var juneLibrary = withRetryNotice(
|
|
120
|
+
withToolApprovalCard(withDocumentEditor(withChatLayout(openuiChatLibrary)))
|
|
121
|
+
);
|
|
112
122
|
var defaultRegistry = createComponentRegistry({ base: juneLibrary });
|
|
113
123
|
function registerComponent(components, options) {
|
|
114
124
|
return defaultRegistry.register(components, options);
|
|
@@ -174,12 +184,18 @@ export {
|
|
|
174
184
|
JuneError,
|
|
175
185
|
JuneErrorBoundary,
|
|
176
186
|
JuneRenderer,
|
|
187
|
+
JuneRetryNoticeComponent,
|
|
177
188
|
JuneRuntimeContext,
|
|
178
189
|
JuneThemeProvider,
|
|
190
|
+
JuneToolApprovalCardComponent,
|
|
179
191
|
JuneUI,
|
|
180
192
|
JuneUIProvider,
|
|
181
193
|
MarkdownText,
|
|
194
|
+
RETRY_NOTICE_DESCRIPTION,
|
|
195
|
+
RetryNotice,
|
|
196
|
+
TOOL_APPROVAL_CARD_DESCRIPTION,
|
|
182
197
|
ToolApproval,
|
|
198
|
+
ToolApprovalCard,
|
|
183
199
|
ToolApprovalList,
|
|
184
200
|
consumeStream,
|
|
185
201
|
copyDocumentToClipboard,
|
|
@@ -245,5 +261,7 @@ export {
|
|
|
245
261
|
useResolvedTheme,
|
|
246
262
|
useToolApproval,
|
|
247
263
|
validateComponentDefinition,
|
|
248
|
-
withDocumentEditor
|
|
264
|
+
withDocumentEditor,
|
|
265
|
+
withRetryNotice,
|
|
266
|
+
withToolApprovalCard
|
|
249
267
|
};
|
package/dist/june.css
CHANGED
|
@@ -634,3 +634,228 @@
|
|
|
634
634
|
display: grid;
|
|
635
635
|
gap: 8px;
|
|
636
636
|
}
|
|
637
|
+
|
|
638
|
+
/* Model-rendered tool approval card. Separate from .june-approval so the existing card is unchanged. */
|
|
639
|
+
.june-approval-card {
|
|
640
|
+
display: flex;
|
|
641
|
+
align-items: flex-start;
|
|
642
|
+
gap: 12px;
|
|
643
|
+
max-width: 100%;
|
|
644
|
+
min-width: 0;
|
|
645
|
+
box-sizing: border-box;
|
|
646
|
+
margin: 8px 0;
|
|
647
|
+
padding: 16px 18px;
|
|
648
|
+
border: 1px solid #eadcc4;
|
|
649
|
+
border-radius: 16px;
|
|
650
|
+
background: #fff;
|
|
651
|
+
color: #1c1917;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.june-approval-card__icon {
|
|
655
|
+
display: inline-flex;
|
|
656
|
+
flex: none;
|
|
657
|
+
align-items: center;
|
|
658
|
+
justify-content: center;
|
|
659
|
+
width: 36px;
|
|
660
|
+
height: 36px;
|
|
661
|
+
border-radius: 999px;
|
|
662
|
+
background: #f6efe3;
|
|
663
|
+
color: #c4a36a;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.june-approval-card__glyph {
|
|
667
|
+
width: 18px;
|
|
668
|
+
height: 18px;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.june-approval-card__body {
|
|
672
|
+
display: grid;
|
|
673
|
+
gap: 10px;
|
|
674
|
+
min-width: 0;
|
|
675
|
+
flex: 1;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.june-approval-card__title {
|
|
679
|
+
margin: 0;
|
|
680
|
+
font-size: 15px;
|
|
681
|
+
font-weight: 600;
|
|
682
|
+
line-height: 1.4;
|
|
683
|
+
color: #1c1917;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.june-approval-card__meta {
|
|
687
|
+
display: flex;
|
|
688
|
+
flex-wrap: wrap;
|
|
689
|
+
align-items: center;
|
|
690
|
+
gap: 8px;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.june-approval-card__tool {
|
|
694
|
+
padding: 2px 8px;
|
|
695
|
+
border-radius: 8px;
|
|
696
|
+
background: #f3f4f6;
|
|
697
|
+
color: #6b7280;
|
|
698
|
+
font-size: 13px;
|
|
699
|
+
line-height: 1.4;
|
|
700
|
+
text-decoration: underline;
|
|
701
|
+
text-underline-offset: 2px;
|
|
702
|
+
overflow-wrap: anywhere;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.june-approval-card__effect {
|
|
706
|
+
color: #9ca3af;
|
|
707
|
+
font-size: 13px;
|
|
708
|
+
line-height: 1.4;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.june-approval-card__risk {
|
|
712
|
+
padding: 2px 10px;
|
|
713
|
+
border-radius: 999px;
|
|
714
|
+
background: #fff4e8;
|
|
715
|
+
color: #d97706;
|
|
716
|
+
font-size: 13px;
|
|
717
|
+
font-weight: 600;
|
|
718
|
+
line-height: 1.4;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.june-approval-card__risk[data-risk="low"] {
|
|
722
|
+
background: #ecfdf3;
|
|
723
|
+
color: #15803d;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.june-approval-card__risk[data-risk="high"] {
|
|
727
|
+
background: #fef2f2;
|
|
728
|
+
color: #dc2626;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.june-approval-card__actions {
|
|
732
|
+
display: flex;
|
|
733
|
+
flex-wrap: wrap;
|
|
734
|
+
align-items: center;
|
|
735
|
+
gap: 8px;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
.june-approval-card__button {
|
|
739
|
+
display: inline-flex;
|
|
740
|
+
align-items: center;
|
|
741
|
+
gap: 6px;
|
|
742
|
+
margin: 0;
|
|
743
|
+
padding: 8px 14px;
|
|
744
|
+
border: 1px solid transparent;
|
|
745
|
+
border-radius: 10px;
|
|
746
|
+
background: transparent;
|
|
747
|
+
color: #4b5563;
|
|
748
|
+
font: inherit;
|
|
749
|
+
font-size: 14px;
|
|
750
|
+
font-weight: 600;
|
|
751
|
+
line-height: 1.2;
|
|
752
|
+
cursor: pointer;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.june-approval-card__button[data-choice="approve"] {
|
|
756
|
+
border-color: #1e40af;
|
|
757
|
+
background: #1e40af;
|
|
758
|
+
color: #fff;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.june-approval-card__button[data-choice="reject"] {
|
|
762
|
+
border-color: #e5e7eb;
|
|
763
|
+
background: #fff;
|
|
764
|
+
color: #374151;
|
|
765
|
+
font-weight: 500;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.june-approval-card__button[data-choice="edit"] {
|
|
769
|
+
padding-left: 8px;
|
|
770
|
+
padding-right: 8px;
|
|
771
|
+
color: #4b5563;
|
|
772
|
+
font-weight: 500;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.june-approval-card__btn-icon {
|
|
776
|
+
width: 14px;
|
|
777
|
+
height: 14px;
|
|
778
|
+
flex: none;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
.june-approval-card__button:disabled {
|
|
782
|
+
opacity: 0.5;
|
|
783
|
+
cursor: not-allowed;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/* Failure notice with a Retry button. */
|
|
787
|
+
.june-retry {
|
|
788
|
+
display: flex;
|
|
789
|
+
align-items: center;
|
|
790
|
+
gap: 12px;
|
|
791
|
+
max-width: 100%;
|
|
792
|
+
min-width: 0;
|
|
793
|
+
box-sizing: border-box;
|
|
794
|
+
margin: 8px 0;
|
|
795
|
+
padding: 14px 16px;
|
|
796
|
+
border: 1px solid #f3c7c7;
|
|
797
|
+
border-radius: 16px;
|
|
798
|
+
background: #fff6f6;
|
|
799
|
+
color: #1c1917;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
.june-retry__icon {
|
|
803
|
+
display: inline-flex;
|
|
804
|
+
flex: none;
|
|
805
|
+
color: #ef4444;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
.june-retry__glyph {
|
|
809
|
+
width: 22px;
|
|
810
|
+
height: 22px;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.june-retry__copy {
|
|
814
|
+
min-width: 0;
|
|
815
|
+
flex: 1;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.june-retry__title {
|
|
819
|
+
margin: 0;
|
|
820
|
+
font-size: 15px;
|
|
821
|
+
font-weight: 700;
|
|
822
|
+
line-height: 1.35;
|
|
823
|
+
color: #111827;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.june-retry__message {
|
|
827
|
+
margin: 2px 0 0;
|
|
828
|
+
font-size: 14px;
|
|
829
|
+
line-height: 1.4;
|
|
830
|
+
color: #6b7280;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.june-retry__button {
|
|
834
|
+
display: inline-flex;
|
|
835
|
+
flex: none;
|
|
836
|
+
align-items: center;
|
|
837
|
+
gap: 6px;
|
|
838
|
+
margin: 0;
|
|
839
|
+
padding: 8px 14px;
|
|
840
|
+
border: 1px solid #e5e7eb;
|
|
841
|
+
border-radius: 12px;
|
|
842
|
+
background: #fff;
|
|
843
|
+
box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
|
|
844
|
+
color: #111827;
|
|
845
|
+
font: inherit;
|
|
846
|
+
font-size: 14px;
|
|
847
|
+
font-weight: 600;
|
|
848
|
+
line-height: 1.2;
|
|
849
|
+
cursor: pointer;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.june-retry__btn-icon {
|
|
853
|
+
width: 15px;
|
|
854
|
+
height: 15px;
|
|
855
|
+
flex: none;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.june-retry__button:disabled {
|
|
859
|
+
opacity: 0.5;
|
|
860
|
+
cursor: not-allowed;
|
|
861
|
+
}
|
package/package.json
CHANGED