@octaviaflow/core 3.1.0-beta.101 → 3.1.0-beta.102

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.
@@ -0,0 +1,44 @@
1
+ import { type CSSProperties, type ReactNode } from "react";
2
+ /** What the FxPanel puts on the drag, and what a host passes to `insert`. */
3
+ export interface ExpressionInsert {
4
+ /** The raw value: `ods://steps/x/output/at`, or `user.fmt()`. */
5
+ value: string;
6
+ /** `variable` becomes a pill; `function` becomes editable text. */
7
+ kind?: "variable" | "function";
8
+ }
9
+ export interface ExpressionFieldProps {
10
+ value: string;
11
+ onChange: (next: string) => void;
12
+ label?: ReactNode;
13
+ placeholder?: string;
14
+ helperText?: ReactNode;
15
+ disabled?: boolean;
16
+ /** Visible rows at rest. The field grows with its content. */
17
+ rows?: number;
18
+ id?: string;
19
+ className?: string;
20
+ style?: CSSProperties;
21
+ /**
22
+ * Visible text for a reference pill. Defaults to a readable tail of the
23
+ * reference (`steps/x/output/created` → `created`). Pass a STABLE function —
24
+ * its identity re-renders the content.
25
+ */
26
+ resolveLabel?: (token: string) => string | undefined;
27
+ /**
28
+ * Treat every `{{…}}` as a pill-able reference, not just `{{ods://…}}`.
29
+ * For hosts whose tokens are their own short form (`{{step.field}}`).
30
+ */
31
+ pillEveryToken?: boolean;
32
+ "aria-label"?: string;
33
+ }
34
+ /** A short, human tail for a reference: the last path segments. */
35
+ export declare function shortReferenceLabel(token: string): string;
36
+ /**
37
+ * Is the caret inside the parentheses of a call? Counts unclosed `(` in the
38
+ * text before it, ignoring anything inside quotes — so a `(` in a message is
39
+ * not mistaken for a call, and `"a(b"` does not open one.
40
+ */
41
+ export declare function insideCallArguments(textBeforeCaret: string): boolean;
42
+ export declare function ExpressionField({ value, onChange, label, placeholder, helperText, disabled, rows, id, className, style, resolveLabel, pillEveryToken, "aria-label": ariaLabel, }: ExpressionFieldProps): import("react/jsx-runtime").JSX.Element;
43
+ export default ExpressionField;
44
+ //# sourceMappingURL=ExpressionField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpressionField.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionField/ExpressionField.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAKL,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACrD;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAWD,mEAAmE;AACnE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWzD;AAyBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAiBpE;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAgB,EAChB,IAAQ,EACR,EAAE,EACF,SAAS,EACT,KAAK,EACL,YAAY,EACZ,cAAsB,EACtB,YAAY,EAAE,SAAS,GACxB,EAAE,oBAAoB,2CAuOtB;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ExpressionField, shortReferenceLabel, insideCallArguments } from "./ExpressionField";
2
+ export type { ExpressionFieldProps, ExpressionInsert } from "./ExpressionField";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC9F,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}