@ai-matrx/content-ir-react 0.20.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/{directive-host-B1hcjJxS.d.cts → directive-host-CtFMuSZc.d.cts} +7 -0
- package/dist/{directive-host-B1hcjJxS.d.ts → directive-host-CtFMuSZc.d.ts} +7 -0
- package/dist/directives.cjs +13 -8
- package/dist/directives.cjs.map +1 -1
- package/dist/directives.d.cts +2 -2
- package/dist/directives.d.ts +2 -2
- package/dist/directives.js +13 -8
- package/dist/directives.js.map +1 -1
- package/dist/{host-types-Cn2lf8q3.d.cts → host-types-BRLk_J_3.d.cts} +1 -1
- package/dist/{host-types-BOWu99zI.d.ts → host-types-BpcRcZ48.d.ts} +1 -1
- package/dist/host.cjs.map +1 -1
- package/dist/host.d.cts +3 -3
- package/dist/host.d.ts +3 -3
- package/dist/host.js.map +1 -1
- package/dist/index.cjs +13 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +13 -8
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +13 -8
- package/dist/react.js.map +1 -1
- package/dist/{route-CDATmjfp.d.ts → route-CiCUQGAB.d.ts} +7 -0
- package/dist/{route-DVfjdUYy.d.cts → route-DMTBn8w4.d.cts} +7 -0
- package/dist/route.d.cts +1 -1
- package/dist/route.d.ts +1 -1
- package/package.json +1 -1
package/dist/directives.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DirectiveHost, a as DirectiveFailure, b as DirectiveFailureWords, c as DirectiveRecordRef } from './directive-host-
|
|
2
|
-
export { d as DirectiveApplyResult, e as DirectiveApplyState, f as DirectiveAskRequest, g as DirectiveCopyProps, h as DirectiveHostProvider, i as DirectiveHostProviderProps, j as DirectiveOpenItemOptions, k as DirectiveRecordProps, l as DirectiveScope, m as DirectiveScopeProvider, n as DirectiveShell, o as DirectiveValueRef, u as useDirectiveHost, p as useDirectiveScope } from './directive-host-
|
|
1
|
+
import { D as DirectiveHost, a as DirectiveFailure, b as DirectiveFailureWords, c as DirectiveRecordRef } from './directive-host-CtFMuSZc.js';
|
|
2
|
+
export { d as DirectiveApplyResult, e as DirectiveApplyState, f as DirectiveAskRequest, g as DirectiveCopyProps, h as DirectiveHostProvider, i as DirectiveHostProviderProps, j as DirectiveOpenItemOptions, k as DirectiveRecordProps, l as DirectiveScope, m as DirectiveScopeProvider, n as DirectiveShell, o as DirectiveValueRef, u as useDirectiveHost, p as useDirectiveScope } from './directive-host-CtFMuSZc.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ComponentType } from 'react';
|
|
5
5
|
import { DecodedDirective, DirectiveClass } from '@ai-matrx/content-ir';
|
package/dist/directives.js
CHANGED
|
@@ -580,7 +580,7 @@ function ApplyDirectiveButton({
|
|
|
580
580
|
type: "button",
|
|
581
581
|
disabled: askingAgain,
|
|
582
582
|
onClick: () => void handleApply(!bad),
|
|
583
|
-
className: "inline-flex items-center gap-1 rounded px-1 py-0.5 text-muted-foreground hover:bg-accent hover:text-accent-foreground disabled:opacity-50",
|
|
583
|
+
className: "inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded px-1 py-0.5 text-muted-foreground hover:bg-accent hover:text-accent-foreground disabled:opacity-50",
|
|
584
584
|
"data-apply-action": bad ? "retry" : "run-again",
|
|
585
585
|
children: [
|
|
586
586
|
/* @__PURE__ */ jsx3(RotateCcwIcon, { className: "h-3 w-3" }),
|
|
@@ -620,8 +620,8 @@ function ApplyDirectiveButton({
|
|
|
620
620
|
}
|
|
621
621
|
const destructive = directive.directiveClass === "delete";
|
|
622
622
|
const muted = nothingToChange && view.status === "idle";
|
|
623
|
-
return /* @__PURE__ */ jsxs2("span", { className: "
|
|
624
|
-
muted ? /* @__PURE__ */ jsx3("span", { className: "text-xs text-muted-foreground", "data-apply-nothing": "", children: "Nothing to change" }) : null,
|
|
623
|
+
return /* @__PURE__ */ jsxs2("span", { className: "flex min-w-0 flex-wrap items-center justify-end gap-x-2 gap-y-1", children: [
|
|
624
|
+
muted ? /* @__PURE__ */ jsx3("span", { className: "min-w-0 text-xs text-muted-foreground", "data-apply-nothing": "", children: "Nothing to change" }) : null,
|
|
625
625
|
/* @__PURE__ */ jsxs2(
|
|
626
626
|
"button",
|
|
627
627
|
{
|
|
@@ -630,7 +630,7 @@ function ApplyDirectiveButton({
|
|
|
630
630
|
disabled: view.status === "applying" || view.status === "asking" || items.length === 0,
|
|
631
631
|
"data-apply-tone": muted ? "muted" : destructive ? "destructive" : "default",
|
|
632
632
|
title: muted ? "It sets no fields, so applying it changes nothing." : void 0,
|
|
633
|
-
className: `inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs font-medium disabled:opacity-50 ${muted ? "border-border/60 bg-background text-muted-foreground hover:bg-accent" : destructive ? "border-destructive/50 bg-background text-destructive hover:bg-destructive/10" : "border-border bg-background hover:bg-accent"}`,
|
|
633
|
+
className: `inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-md border px-2 py-1 text-xs font-medium disabled:opacity-50 ${muted ? "border-border/60 bg-background text-muted-foreground hover:bg-accent" : destructive ? "border-destructive/50 bg-background text-destructive hover:bg-destructive/10" : "border-border bg-background hover:bg-accent"}`,
|
|
634
634
|
children: [
|
|
635
635
|
view.status === "applying" ? /* @__PURE__ */ jsx3(LoaderIcon, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx3(PlayIcon, { className: "h-3.5 w-3.5" }),
|
|
636
636
|
view.status === "applying" ? `Applying${itemCount ? ` ${itemCount} ${itemCount === 1 ? "item" : "items"}` : ""}\u2026${elapsed ? ` ${elapsed}s` : ""}` : label
|
|
@@ -681,7 +681,7 @@ function FailureNotice({
|
|
|
681
681
|
type: "button",
|
|
682
682
|
onClick: () => setOpen((v) => !v),
|
|
683
683
|
"aria-expanded": open,
|
|
684
|
-
className: "ml-1 underline underline-offset-2 hover:no-underline",
|
|
684
|
+
className: "ml-1 whitespace-nowrap underline underline-offset-2 hover:no-underline",
|
|
685
685
|
"data-apply-failure-details-toggle": true,
|
|
686
686
|
children: open ? "Hide details" : "Details"
|
|
687
687
|
}
|
|
@@ -843,7 +843,12 @@ function TargetRow({
|
|
|
843
843
|
return /* @__PURE__ */ jsxs3("div", { className: "py-1 text-xs", "data-directive-target": recordId, children: [
|
|
844
844
|
/* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
845
845
|
/* @__PURE__ */ jsx4("span", { className: "flex min-w-0 flex-1 items-center gap-1 px-1", children: name }),
|
|
846
|
-
host.renderCopy?.({
|
|
846
|
+
host.renderCopy?.({
|
|
847
|
+
label: `this ${nounLabel2(directive.noun, host.nouns).toLowerCase()}`,
|
|
848
|
+
value: item,
|
|
849
|
+
size: "xs",
|
|
850
|
+
record: { noun: directive.noun, id: recordId }
|
|
851
|
+
})
|
|
847
852
|
] }),
|
|
848
853
|
isUpdate ? /* @__PURE__ */ jsx4(DirectiveChangeList, { changes, className: "mt-0.5 px-1" }) : null
|
|
849
854
|
] });
|
|
@@ -871,7 +876,7 @@ function SideEffectDirectiveCard({ directive }) {
|
|
|
871
876
|
" ",
|
|
872
877
|
total === 1 ? "item" : "items"
|
|
873
878
|
] }),
|
|
874
|
-
/* @__PURE__ */ jsxs3("div", { className: "ml-auto flex items-center gap-1", children: [
|
|
879
|
+
/* @__PURE__ */ jsxs3("div", { className: "ml-auto flex min-w-0 flex-wrap items-center justify-end gap-1", children: [
|
|
875
880
|
host.renderCopy?.({ label: display.title, value: directive.shell, size: "icon" }),
|
|
876
881
|
/* @__PURE__ */ jsx4(
|
|
877
882
|
ApplyDirectiveButton,
|
|
@@ -893,7 +898,7 @@ function SideEffectDirectiveCard({ directive }) {
|
|
|
893
898
|
{
|
|
894
899
|
type: "button",
|
|
895
900
|
onClick: () => setExpanded((v) => !v),
|
|
896
|
-
className: "mt-0.5 inline-flex items-center gap-1 rounded px-1 py-0.5 text-[11px] text-muted-foreground hover:text-foreground",
|
|
901
|
+
className: "mt-0.5 inline-flex items-center gap-1 whitespace-nowrap rounded px-1 py-0.5 text-[11px] text-muted-foreground hover:text-foreground",
|
|
897
902
|
children: [
|
|
898
903
|
expanded ? /* @__PURE__ */ jsx4(ChevronDownIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx4(ChevronRightIcon, { className: "h-3 w-3" }),
|
|
899
904
|
expanded ? "Show less" : `Show ${hidden} more`
|