@tai42/studio-sdk 9.2.0 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,6 +21,11 @@ pnpm add @tai42/studio-sdk
21
21
 
22
22
  - `@tai42/studio-sdk` — the plugin API, design system, and hooks.
23
23
  - `@tai42/studio-sdk/host` — the host-only plugin registry.
24
+ - `@tai42/studio-sdk/schema-form` — a jq-free `SchemaForm` entry for bundling
25
+ consumers: importing it emits no jq editor, worker, or wasm. It imports no
26
+ CSS by design — a subpath consumer loads `tokens.css` and `components.css`
27
+ explicitly. Expression fields render as plain inputs unless the host injects
28
+ a door (see `ExpressionFieldContext`).
24
29
  - `@tai42/studio-sdk/testing` — test-only helpers: a registry reset and
25
30
  `installJsdomStubs()`, which fills the browser APIs jsdom omits.
26
31
  - `@tai42/studio-sdk/tokens.css` — the design-token stylesheet. It also emits the
package/dist/index.d.ts CHANGED
@@ -133,8 +133,8 @@ export { TOKEN_NAMES } from './components/tokens';
133
133
  export type { TokenName } from './components/tokens';
134
134
  export { NAV_ICONS, DashboardIcon, ToolsIcon, AgentsIcon, PresetsIcon, ExtensionsIcon, TemplatesIcon, ConnectorsIcon, HooksIcon, StorageIcon, SchedulingIcon, InteractionsIcon, NotificationsIcon, ConversationsIcon, MarketplaceIcon, ManifestIcon, SettingsIcon, SystemIcon, SearchIcon, SignOutIcon, MenuIcon, CloseIcon, FolderIcon, GridIcon, FilterIcon, ArrowLeftIcon, ArrowUpIcon, ArrowDownIcon, ChevronDownIcon, ChevronRightIcon, CheckIcon, MinusIcon, CopyIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, SortAscIcon, SortDescIcon, SunIcon, MoonIcon, MonitorIcon, CheckCircleIcon, AlertTriangleIcon, XCircleIcon, PendingIcon, } from './components/icons';
135
135
  export type { IconProps, IconComponent } from './components/icons';
136
- export { SchemaForm, RecordEntryRendererContext, SecretRefField, defaultValueForSchema, validateAgainstSchema, resolveRef, } from './schema-form';
137
- export type { SchemaFormProps, CompletionProvider, RecordEntryRenderer, RecordEntryContext, SecretRefFieldProps, SecretRef, JsonSchema, JsonSchemaType, Discriminator, SchemaFormErrors, } from './schema-form';
136
+ export { SchemaForm, RecordEntryRendererContext, ExpressionFieldContext, SecretRefField, defaultValueForSchema, validateAgainstSchema, resolveRef, } from './schema-form';
137
+ export type { SchemaFormProps, CompletionProvider, RecordEntryRenderer, RecordEntryContext, ExpressionFieldComponent, ExpressionFieldProps, ExpressionInputShape, ExpressionInputKey, SecretRefFieldProps, SecretRef, JsonSchema, JsonSchemaType, Discriminator, SchemaFormErrors, } from './schema-form';
138
138
  export { SchemaEditor, lintSchemaText } from './schema-editor';
139
139
  export type { SchemaEditorProps, SchemaEditorChange, SchemaLintResult } from './schema-editor';
140
140
  export { ProgressBar } from './components/progress-bar';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,OAAO,yBAAyB,CAAC;AACjC,OAAO,wBAAwB,CAAC;AAChC,OAAO,6BAA6B,CAAC;AAGrC,YAAY,EACV,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACpF,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,SAAS,EACT,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,MAAM,CAAC;AACd,YAAY,EACV,YAAY,EACZ,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"}
package/dist/index.js CHANGED
@@ -103,7 +103,13 @@ export { TOKEN_NAMES } from './components/tokens';
103
103
  // -- Iconography (the only sanctioned marks; Unicode glyphs are banned) -------
104
104
  export { NAV_ICONS, DashboardIcon, ToolsIcon, AgentsIcon, PresetsIcon, ExtensionsIcon, TemplatesIcon, ConnectorsIcon, HooksIcon, StorageIcon, SchedulingIcon, InteractionsIcon, NotificationsIcon, ConversationsIcon, MarketplaceIcon, ManifestIcon, SettingsIcon, SystemIcon, SearchIcon, SignOutIcon, MenuIcon, CloseIcon, FolderIcon, GridIcon, FilterIcon, ArrowLeftIcon, ArrowUpIcon, ArrowDownIcon, ChevronDownIcon, ChevronRightIcon, CheckIcon, MinusIcon, CopyIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, SortAscIcon, SortDescIcon, SunIcon, MoonIcon, MonitorIcon, CheckCircleIcon, AlertTriangleIcon, XCircleIcon, PendingIcon, } from './components/icons';
105
105
  // -- Schema-driven forms -----------------------------------------------------
106
- export { SchemaForm, RecordEntryRendererContext, SecretRefField, defaultValueForSchema, validateAgainstSchema, resolveRef, } from './schema-form';
106
+ export { SchemaForm, RecordEntryRendererContext,
107
+ // The expression-door injection point: a host that wants `x-tai42-expression`
108
+ // fields to author through the visual editor hands `JqField` to a form (the
109
+ // `expressionField` prop) or mounts this context above its tree. A form with no
110
+ // door renders those fields as plain string inputs and stays free of the jq
111
+ // subgraph — the editor, its worker, and its wasm — entirely.
112
+ ExpressionFieldContext, SecretRefField, defaultValueForSchema, validateAgainstSchema, resolveRef, } from './schema-form';
107
113
  // -- Schema-editor (validated JSON-Schema authoring control) -----------------
108
114
  export { SchemaEditor, lintSchemaText } from './schema-editor';
109
115
  // -- MCP context widgets (elicitation / progress / completions / output) -----
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,kFAAkF;AAClF,+EA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AAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC"}
package/dist/jq.d.ts CHANGED
@@ -6,6 +6,14 @@
6
6
  * the drop-in `JqField`, the lower-level `JqEditorDialog`, the agnostic
7
7
  * field-declaration contract, and the runtime loader/worker helpers.
8
8
  *
9
+ * NOTHING IN THE SDK IMPORTS THIS MODULE. Every edge to it runs the other way: a
10
+ * host imports `JqField` from here and hands it in — to a `SchemaForm` through its
11
+ * `expressionField` prop or the ambient `ExpressionFieldContext`, or straight into
12
+ * its own JSX. That is what keeps this heavy subgraph — the visual editor, its
13
+ * worker file, and its wasm engine — OUT of the bundle of a consumer that imports
14
+ * the SDK for anything else; a bundler emits a dynamic import's chunks as surely
15
+ * as a static import's, so `lazy` inside the SDK would not have kept them out.
16
+ *
9
17
  * BUNDLE + WORKER SHARING. A plugin bundle externalises `@tai42/studio-sdk`, so
10
18
  * the SDK — and the one copy of `@tai42/jq-studio` it carries — ships once for the
11
19
  * whole deployment. A plugin that renders `JqField` shares the host's single jq
package/dist/jq.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"jq.d.ts","sourceRoot":"","sources":["../src/jq.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,SAAS,EACT,sBAAsB,EAWtB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAGlB,UAAU,GACX,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"jq.d.ts","sourceRoot":"","sources":["../src/jq.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,SAAS,EACT,sBAAsB,EAWtB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAGlB,UAAU,GACX,MAAM,kBAAkB,CAAC"}
package/dist/jq.js CHANGED
@@ -6,6 +6,14 @@
6
6
  * the drop-in `JqField`, the lower-level `JqEditorDialog`, the agnostic
7
7
  * field-declaration contract, and the runtime loader/worker helpers.
8
8
  *
9
+ * NOTHING IN THE SDK IMPORTS THIS MODULE. Every edge to it runs the other way: a
10
+ * host imports `JqField` from here and hands it in — to a `SchemaForm` through its
11
+ * `expressionField` prop or the ambient `ExpressionFieldContext`, or straight into
12
+ * its own JSX. That is what keeps this heavy subgraph — the visual editor, its
13
+ * worker file, and its wasm engine — OUT of the bundle of a consumer that imports
14
+ * the SDK for anything else; a bundler emits a dynamic import's chunks as surely
15
+ * as a static import's, so `lazy` inside the SDK would not have kept them out.
16
+ *
9
17
  * BUNDLE + WORKER SHARING. A plugin bundle externalises `@tai42/studio-sdk`, so
10
18
  * the SDK — and the one copy of `@tai42/jq-studio` it carries — ships once for the
11
19
  * whole deployment. A plugin that renders `JqField` shares the host's single jq
package/dist/jq.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"jq.js","sourceRoot":"","sources":["../src/jq.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,SAAS,EACT,sBAAsB;AACtB,yEAAyE;AACzE,2EAA2E;AAC3E,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,gFAAgF;AAChF,6EAA6E;AAC7E,kEAAkE;AAClE,kBAAkB,GACnB,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"jq.js","sourceRoot":"","sources":["../src/jq.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,EACd,SAAS,EACT,sBAAsB;AACtB,yEAAyE;AACzE,2EAA2E;AAC3E,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,gFAAgF;AAChF,6EAA6E;AAC7E,kEAAkE;AAClE,kBAAkB,GACnB,MAAM,kBAAkB,CAAC"}
@@ -32,8 +32,19 @@
32
32
  * validator ignores it); these client-side caps are UX guards, and the SERVER
33
33
  * MUST independently validate the decoded size. The base64 decoding and cap
34
34
  * checks live in the sibling `media` module.
35
+ *
36
+ * EXPRESSION FIELDS ARE OPT-IN. A string field carrying `x-tai42-expression`
37
+ * renders an expression-authoring door — the SDK's `JqField` — only when the host
38
+ * INJECTS one, through {@link SchemaFormProps.expressionField} or the ambient
39
+ * {@link ExpressionFieldContext}; with no door it renders the plain string input.
40
+ * The form owns no edge to the door: importing it here, even dynamically behind
41
+ * `lazy`, would EMIT the visual editor, its worker file, and a multi-megabyte wasm
42
+ * engine into every consumer that bundles the SDK to render forms, whether or not
43
+ * a form ever authors an expression. Injection puts that weight on the hosts that
44
+ * want it and only there.
35
45
  */
36
46
  import type { ReactNode } from 'react';
47
+ import type { ExpressionFieldComponent } from './context';
37
48
  import type { JsonSchema, SchemaFormErrors } from './types';
38
49
  /**
39
50
  * Fetch argument-value suggestions for a string field. `argName` is the field's
@@ -61,10 +72,18 @@ export interface SchemaFormProps {
61
72
  * absent both, {@link DEFAULT_MAX_UPLOAD_BYTES} applies.
62
73
  */
63
74
  readonly maxUploadBytes?: number;
75
+ /**
76
+ * Optional. The expression-authoring door for `x-tai42-expression` fields —
77
+ * the SDK's `JqField`, which the host imports directly and passes here (see
78
+ * the module doc-comment). Omitted, the enclosing
79
+ * {@link ExpressionFieldContext} supplies it; absent both, an annotated field
80
+ * renders the plain string input.
81
+ */
82
+ readonly expressionField?: ExpressionFieldComponent;
64
83
  }
65
84
  /**
66
85
  * Render a controlled form for `schema`. The root is usually an object (a tool's
67
86
  * input schema); a scalar/array/union root renders as a single field group.
68
87
  */
69
- export declare function SchemaForm({ schema, value, onChange, errors, idPrefix, completionProvider, maxUploadBytes, }: SchemaFormProps): ReactNode;
88
+ export declare function SchemaForm({ schema, value, onChange, errors, idPrefix, completionProvider, maxUploadBytes, expressionField, }: SchemaFormProps): ReactNode;
70
89
  //# sourceMappingURL=SchemaForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaForm.d.ts","sourceRoot":"","sources":["../../src/schema-form/SchemaForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAI5D;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAEzF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IA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AAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;CACrD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAwB,EACxB,kBAAkB,EAClB,cAAyC,EACzC,eAAe,GAChB,EAAE,eAAe,GAAG,SAAS,CA0B7B"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { CompletionProviderContext, MaxUploadBytesContext } from './context';
2
+ import { useContext } from 'react';
3
+ import { CompletionProviderContext, ExpressionFieldContext, MaxUploadBytesContext, } from './context';
3
4
  import { FieldNode } from './field-node';
4
5
  import { DEFAULT_MAX_UPLOAD_BYTES } from './media';
5
6
  import { stackClass } from './styles';
@@ -7,7 +8,11 @@ import { stackClass } from './styles';
7
8
  * Render a controlled form for `schema`. The root is usually an object (a tool's
8
9
  * input schema); a scalar/array/union root renders as a single field group.
9
10
  */
10
- export function SchemaForm({ schema, value, onChange, errors, idPrefix = 'schema-form', completionProvider, maxUploadBytes = DEFAULT_MAX_UPLOAD_BYTES, }) {
11
- return (_jsx(CompletionProviderContext.Provider, { value: completionProvider, children: _jsx(MaxUploadBytesContext.Provider, { value: maxUploadBytes, children: _jsx("div", { className: stackClass, "data-testid": idPrefix, children: _jsx(FieldNode, { schema: schema, root: schema, value: value, onChange: onChange, path: "", label: undefined, required: true, errors: errors, idPrefix: idPrefix }) }) }) }));
11
+ export function SchemaForm({ schema, value, onChange, errors, idPrefix = 'schema-form', completionProvider, maxUploadBytes = DEFAULT_MAX_UPLOAD_BYTES, expressionField, }) {
12
+ // The prop overrides the ambient door for this form only; omitted, the
13
+ // enclosing one flows through unchanged (providing `undefined` would BLIND the
14
+ // form to a door the host wired above it).
15
+ const ambientExpressionField = useContext(ExpressionFieldContext);
16
+ return (_jsx(CompletionProviderContext.Provider, { value: completionProvider, children: _jsx(MaxUploadBytesContext.Provider, { value: maxUploadBytes, children: _jsx(ExpressionFieldContext.Provider, { value: expressionField ?? ambientExpressionField, children: _jsx("div", { className: stackClass, "data-testid": idPrefix, children: _jsx(FieldNode, { schema: schema, root: schema, value: value, onChange: onChange, path: "", label: undefined, required: true, errors: errors, idPrefix: idPrefix }) }) }) }) }));
12
17
  }
13
18
  //# sourceMappingURL=SchemaForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaForm.js","sourceRoot":"","sources":["../../src/schema-form/SchemaForm.tsx"],"names":[],"mappings":";AAqCA,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAkCtC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,GAAG,aAAa,EACxB,kBAAkB,EAClB,cAAc,GAAG,wBAAwB,GACzB;IAChB,OAAO,CACL,KAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,kBAAkB,YAC3D,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,cAAc,YACnD,cAAK,SAAS,EAAE,UAAU,iBAAe,QAAQ,YAC/C,KAAC,SAAS,IACR,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,EAAE,EACP,KAAK,EAAE,SAAS,EAChB,QAAQ,QACR,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GAClB,GACE,GACyB,GACE,CACtC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"SchemaForm.js","sourceRoot":"","sources":["../../src/schema-form/SchemaForm.tsx"],"names":[],"mappings":";AA8CA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA0CtC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,GAAG,aAAa,EACxB,kBAAkB,EAClB,cAAc,GAAG,wBAAwB,EACzC,eAAe,GACC;IAChB,uEAAuE;IACvE,+EAA+E;IAC/E,2CAA2C;IAC3C,MAAM,sBAAsB,GAAG,UAAU,CAAC,sBAAsB,CAAC,CAAC;IAClE,OAAO,CACL,KAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,kBAAkB,YAC3D,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,cAAc,YACnD,KAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAE,eAAe,IAAI,sBAAsB,YAC/E,cAAK,SAAS,EAAE,UAAU,iBAAe,QAAQ,YAC/C,KAAC,SAAS,IACR,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,EAAE,EACP,KAAK,EAAE,SAAS,EAChB,QAAQ,QACR,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GAClB,GACE,GAC0B,GACH,GACE,CACtC,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import type { ComponentType, ReactNode } from 'react';
2
2
  import type { CompletionProvider } from './SchemaForm';
3
3
  import type { JsonSchema } from './types';
4
4
  export declare const CompletionProviderContext: import("react").Context<CompletionProvider | undefined>;
@@ -25,4 +25,76 @@ export interface RecordEntryContext {
25
25
  */
26
26
  export type RecordEntryRenderer = (entry: RecordEntryContext) => ReactNode;
27
27
  export declare const RecordEntryRendererContext: import("react").Context<RecordEntryRenderer | undefined>;
28
+ /** One top-level key of the expression's input document, with a one-line gloss. */
29
+ export interface ExpressionInputKey {
30
+ readonly name: string;
31
+ readonly gloss: string;
32
+ }
33
+ /**
34
+ * What `.` IS for an expression-annotated field, as the form hands it to the
35
+ * injected door. Built by the renderer from the schema's `x-tai42-expression`
36
+ * annotation.
37
+ *
38
+ * Like the annotation type it is built from, this MIRRORS jq-studio's input-shape
39
+ * descriptor without importing it: the schema-form tree names no jq type, in code
40
+ * OR in its declarations, which is what keeps a consumer that never injects a door
41
+ * free of the jq subgraph. `JqField` satisfies it structurally; a test pins that.
42
+ */
43
+ export interface ExpressionInputShape {
44
+ /** Stable, host-namespaced id, opaque to the door (memoisation/telemetry). */
45
+ readonly id: string;
46
+ /** Short chip label — what `.` is here, e.g. "node envelope". */
47
+ readonly label: string;
48
+ /** One sentence: what `.` is in this field. */
49
+ readonly blurb: string;
50
+ /** The top-level keys of `.`, each with a one-liner. */
51
+ readonly keys: readonly ExpressionInputKey[];
52
+ /** What the expression must RETURN, e.g. "true or false". */
53
+ readonly returns: string;
54
+ /** Per-field caveats. */
55
+ readonly caveats?: readonly string[];
56
+ /** A static skeleton of `.` for the door's test surface. */
57
+ readonly sample?: unknown;
58
+ }
59
+ /**
60
+ * Exactly the props the form hands an injected expression field — no more, so any
61
+ * expression editor can satisfy the contract, and no less, so the form is free to
62
+ * pass all of them. The label/description/error slots are the door's own chrome:
63
+ * an expression field brings its a11y-linked label and helper slots, so the form
64
+ * does NOT wrap it in the usual `Field`.
65
+ */
66
+ export interface ExpressionFieldProps {
67
+ readonly label: string;
68
+ readonly value: string;
69
+ readonly onChange: (value: string) => void;
70
+ readonly description?: ReactNode;
71
+ readonly error?: ReactNode;
72
+ readonly shape?: ExpressionInputShape;
73
+ /** Render a multiline resting control; the form always asks for one. */
74
+ readonly multiline?: boolean;
75
+ }
76
+ /**
77
+ * The expression-authoring door a host INJECTS into the form — `JqField`, imported
78
+ * by the host straight from the SDK's jq surface.
79
+ *
80
+ * It is a COMPONENT, rendered as an element, never called as a function: the door
81
+ * owns hooks and state (editor open, worker handle), which only survive as its own
82
+ * element identity. A host may inject a `lazy` door to keep the jq subgraph in a
83
+ * split chunk — the form mounts it inside a Suspense boundary that paints the
84
+ * resting shell while that chunk resolves.
85
+ */
86
+ export type ExpressionFieldComponent = ComponentType<ExpressionFieldProps>;
87
+ /**
88
+ * The ambient door for the whole form. Absent (the default), an
89
+ * expression-annotated field renders the PLAIN string input, byte-identically to
90
+ * an unannotated one — the jq authoring door is opt-in, because the dynamic import
91
+ * that would fetch it on demand still EMITS its chunks, worker, and wasm into
92
+ * every consumer that bundles the SDK.
93
+ *
94
+ * A host wires it ONCE above its tree (`SchemaEditor`'s preview and
95
+ * `ElicitationForm` render forms a caller does not own the props of, and a plugin
96
+ * page renders its own); the form's own `expressionField` prop overrides it for a
97
+ * single form.
98
+ */
99
+ export declare const ExpressionFieldContext: import("react").Context<ExpressionFieldComponent | undefined>;
28
100
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/schema-form/context.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,yBAAyB,yDAA2D,CAAC;AAIlG,eAAO,MAAM,qBAAqB,iCAAkD,CAAC;AAErF,kEAAkE;AAClE,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,C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C"}
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Ambient React contexts for the schema-form tree: the optional argument
3
- * completion provider and the default media-upload byte cap. A field deep in the
4
- * tree reads these here rather than every intermediate node drilling the prop.
3
+ * completion provider, the default media-upload byte cap, the record-entry value
4
+ * renderer, and the expression-field door. A field deep in the tree reads these
5
+ * here rather than every intermediate node drilling the prop.
5
6
  */
6
7
  import { createContext } from 'react';
7
8
  import { DEFAULT_MAX_UPLOAD_BYTES } from './media';
@@ -14,4 +15,17 @@ export const MaxUploadBytesContext = createContext(DEFAULT_MAX_UPLOAD_BYTES);
14
15
  // Ambient record-entry value renderer for the whole form; the record field reads
15
16
  // it here so intermediate object/array/record nodes never drill the prop.
16
17
  export const RecordEntryRendererContext = createContext(undefined);
18
+ /**
19
+ * The ambient door for the whole form. Absent (the default), an
20
+ * expression-annotated field renders the PLAIN string input, byte-identically to
21
+ * an unannotated one — the jq authoring door is opt-in, because the dynamic import
22
+ * that would fetch it on demand still EMITS its chunks, worker, and wasm into
23
+ * every consumer that bundles the SDK.
24
+ *
25
+ * A host wires it ONCE above its tree (`SchemaEditor`'s preview and
26
+ * `ElicitationForm` render forms a caller does not own the props of, and a plugin
27
+ * page renders its own); the form's own `expressionField` prop overrides it for a
28
+ * single form.
29
+ */
30
+ export const ExpressionFieldContext = createContext(undefined);
17
31
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/schema-form/context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAInD,6EAA6E;AAC7E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,yBAAyB,GAAG,aAAa,CAAiC,SAAS,CAAC,CAAC;AAElG,gFAAgF;AAChF,wDAAwD;AACxD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAS,wBAAwB,CAAC,CAAC;AAyBrF,iFAAiF;AACjF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,0BAA0B,GAAG,aAAa,CAAkC,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/schema-form/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAInD,6EAA6E;AAC7E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,yBAAyB,GAAG,aAAa,CAAiC,SAAS,CAAC,CAAC;AAElG,gFAAgF;AAChF,wDAAwD;AACxD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAS,wBAAwB,CAAC,CAAC;AAyBrF,iFAAiF;AACjF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,0BAA0B,GAAG,aAAa,CAAkC,SAAS,CAAC,CAAC;AAoEpG;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CACjD,SAAS,CACV,CAAC"}
@@ -3,11 +3,38 @@
3
3
  * the tools and interactions features. Public surface: the `SchemaForm`
4
4
  * component plus the value/validation helpers a caller needs to seed, validate,
5
5
  * and submit.
6
+ *
7
+ * THE JQ-FREE ENTRY POINT. This module is published as
8
+ * `@tai42/studio-sdk/schema-form`, and a consumer that BUNDLES the SDK — a
9
+ * standalone widget rather than a host serving the SDK as a shared module —
10
+ * should import the form from here rather than from the package barrel. The
11
+ * barrel re-exports `JqField` off `@tai42/jq-studio`, and a bundler emits that
12
+ * package's Web Worker file and wasm engine from the mere presence of the
13
+ * MODULE in the graph: those assets are emitted while the module is transformed,
14
+ * before tree-shaking can drop the unused re-export. Reaching the form through
15
+ * this entry point, and injecting the door only where it is wanted (see
16
+ * `SchemaForm`'s `expressionField`), is what holds a form-only consumer at zero
17
+ * jq bytes.
18
+ *
19
+ * The design system reaches this entry point through relative imports, so the
20
+ * form renders complete; only the barrel's three CSS side-effect imports stay
21
+ * behind. A consumer importing from here loads the stylesheets it wants
22
+ * explicitly (`@tai42/studio-sdk/tokens.css` and `…/components.css`, plus
23
+ * `…/fonts.css` if it wants the bundled faces).
24
+ *
25
+ * For a BUNDLING consumer only. The shell and every Studio plugin externalise
26
+ * `@tai42/studio-sdk` and resolve it through the served import map, so they must
27
+ * keep importing the barrel: an import map that serves the barrel alone would
28
+ * leave this subpath to be bundled, and the second copy's contexts — the
29
+ * completion provider, the injected expression door — would be different objects
30
+ * from the ones the host provides.
6
31
  */
7
32
  export { SchemaForm } from './SchemaForm';
8
33
  export type { SchemaFormProps, CompletionProvider } from './SchemaForm';
9
34
  export { RecordEntryRendererContext } from './context';
10
35
  export type { RecordEntryRenderer, RecordEntryContext } from './context';
36
+ export { ExpressionFieldContext } from './context';
37
+ export type { ExpressionFieldComponent, ExpressionFieldProps, ExpressionInputShape, ExpressionInputKey, } from './context';
11
38
  export { SecretRefField } from './SecretRefField';
12
39
  export type { SecretRefFieldProps, SecretRef } from './SecretRefField';
13
40
  export { defaultValueForSchema } from './default-value';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema-form/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvD,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema-form/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvD,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EACV,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
@@ -3,9 +3,35 @@
3
3
  * the tools and interactions features. Public surface: the `SchemaForm`
4
4
  * component plus the value/validation helpers a caller needs to seed, validate,
5
5
  * and submit.
6
+ *
7
+ * THE JQ-FREE ENTRY POINT. This module is published as
8
+ * `@tai42/studio-sdk/schema-form`, and a consumer that BUNDLES the SDK — a
9
+ * standalone widget rather than a host serving the SDK as a shared module —
10
+ * should import the form from here rather than from the package barrel. The
11
+ * barrel re-exports `JqField` off `@tai42/jq-studio`, and a bundler emits that
12
+ * package's Web Worker file and wasm engine from the mere presence of the
13
+ * MODULE in the graph: those assets are emitted while the module is transformed,
14
+ * before tree-shaking can drop the unused re-export. Reaching the form through
15
+ * this entry point, and injecting the door only where it is wanted (see
16
+ * `SchemaForm`'s `expressionField`), is what holds a form-only consumer at zero
17
+ * jq bytes.
18
+ *
19
+ * The design system reaches this entry point through relative imports, so the
20
+ * form renders complete; only the barrel's three CSS side-effect imports stay
21
+ * behind. A consumer importing from here loads the stylesheets it wants
22
+ * explicitly (`@tai42/studio-sdk/tokens.css` and `…/components.css`, plus
23
+ * `…/fonts.css` if it wants the bundled faces).
24
+ *
25
+ * For a BUNDLING consumer only. The shell and every Studio plugin externalise
26
+ * `@tai42/studio-sdk` and resolve it through the served import map, so they must
27
+ * keep importing the barrel: an import map that serves the barrel alone would
28
+ * leave this subpath to be bundled, and the second copy's contexts — the
29
+ * completion provider, the injected expression door — would be different objects
30
+ * from the ones the host provides.
6
31
  */
7
32
  export { SchemaForm } from './SchemaForm';
8
33
  export { RecordEntryRendererContext } from './context';
34
+ export { ExpressionFieldContext } from './context';
9
35
  export { SecretRefField } from './SecretRefField';
10
36
  export { defaultValueForSchema } from './default-value';
11
37
  export { validateAgainstSchema } from './validate';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-form/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-form/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAOnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
@@ -1,14 +1,21 @@
1
1
  /**
2
2
  * The string field renderer. A plain string renders as a text input (its
3
3
  * `type` derived from any JSON-Schema `format`); an expression-annotated schema
4
- * renders the jq field (a resting textarea with the visual-editor door); a
5
- * media-annotated schema renders the upload control instead; and when the form
6
- * supplies a completion provider, the input is backed by argument autocomplete.
4
+ * renders the INJECTED expression door (a resting textarea with the visual-editor
5
+ * button) when the host supplies one; a media-annotated schema renders the upload
6
+ * control instead; and when the form supplies a completion provider, the input is
7
+ * backed by argument autocomplete.
7
8
  *
8
- * `JqField` is imported through the SDK's own `./jq` re-export — the ONE
9
- * `@tai42/jq-studio` instance the whole deployment shares — never from
10
- * `@tai42/jq-studio` directly, which would bundle a second copy and orphan its
11
- * worker (see the `jq` module doc-comment).
9
+ * NO JQ EDGE. This module — and every module under `schema-form` — names no jq
10
+ * type and imports the SDK's `../jq` re-export neither statically NOR dynamically.
11
+ * The jq authoring door drags a heavy subgraph (the xyflow visual editor, a Web
12
+ * Worker entry, and a multi-megabyte wasm engine), and a bundler EMITS that whole
13
+ * subgraph for a dynamic import just as it does for a static one — `lazy` defers
14
+ * the FETCH, never the emission. A consumer that bundles the SDK to render forms
15
+ * would still ship the chunks, the worker file, and the wasm it can never run.
16
+ * So the door arrives from the host instead, through
17
+ * {@link ExpressionFieldContext} (or the form's `expressionField` prop), and an
18
+ * annotated field with no injected door falls back to the plain string input.
12
19
  */
13
20
  import type { ReactNode } from 'react';
14
21
  import type { ExpressionAnnotation, MediaUpload } from './classify';
@@ -1 +1 @@
1
- {"version":3,"file":"string-field.d.ts","sourceRoot":"","sources":["../../src/schema-form/string-field.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAKpE,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,WAAW,EACX,KAAK,EACL,MAAM,EACN,KAAK,EACL,UAAU,EACV,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,GAAG,SAAS,CA+DZ"}
1
+ {"version":3,"file":"string-field.d.ts","sourceRoot":"","sources":["../../src/schema-form/string-field.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAMpE,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,WAAW,EACX,KAAK,EACL,MAAM,EACN,KAAK,EACL,UAAU,EACV,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,GAAG,SAAS,CAqEZ"}
@@ -1,29 +1,33 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useCallback, useContext, useMemo, useState } from 'react';
2
+ import { Suspense, useCallback, useContext, useMemo, useState } from 'react';
3
3
  import { CompletionInput } from '../components/completion-input';
4
4
  import { Field } from '../components/field';
5
5
  import { AlertTriangleIcon } from '../components/icons';
6
- import { TextInput } from '../components/inputs';
6
+ import { TextInput, Textarea } from '../components/inputs';
7
7
  import { errorMessage } from '../errors';
8
- import { JqField } from '../jq';
9
- import { CompletionProviderContext } from './context';
8
+ import { CompletionProviderContext, ExpressionFieldContext } from './context';
10
9
  import { MediaField } from './media-field';
11
10
  export function StringField({ heading, description, error, format, media, expression, argName, value, required, onChange, }) {
12
11
  const completionProvider = useContext(CompletionProviderContext);
12
+ const expressionField = useContext(ExpressionFieldContext);
13
13
  const current = typeof value === 'string' ? value : '';
14
14
  // An empty optional field emits `undefined` (drops the key); a required one
15
15
  // keeps the empty string so validation can flag it.
16
16
  const emit = (next) => {
17
17
  onChange(next === '' && !required ? undefined : next);
18
18
  };
19
- // An expression-annotated field renders the jq field — the resting control plus
20
- // the visual-editor door. Checked before `media` because the expression
19
+ // An expression-annotated field renders the injected door — the resting control
20
+ // plus its visual-editor button. Checked before `media` because the expression
21
21
  // annotation is the more specific, deliberate opt-in (`x-tai42-expression`);
22
- // a schema carrying both is contradictory, and a jq expression is text, not an
22
+ // a schema carrying both is contradictory, and an expression is text, not an
23
23
  // upload. Not reachable together with the completion provider path: an
24
24
  // expression is authored, not completed from server suggestions.
25
- if (expression !== undefined) {
26
- return (_jsx(JqExpressionField, { heading: heading, description: description, error: error, expression: expression, argName: argName, value: current, onChange: emit }));
25
+ //
26
+ // With no door injected the annotation is INERT: the field falls through to the
27
+ // ordinary paths below, exactly as a malformed annotation does, so a form
28
+ // renders the same bytes either way.
29
+ if (expression !== undefined && expressionField !== undefined) {
30
+ return (_jsx(ExpressionField, { component: expressionField, heading: heading, description: description, error: error, expression: expression, argName: argName, value: current, onChange: emit }));
27
31
  }
28
32
  // A media-annotated field renders the upload control instead of a text box.
29
33
  if (media !== undefined) {
@@ -63,35 +67,51 @@ function CompletionField({ argName, value, onChange, provider, }) {
63
67
  }, fetchCompletions: fetchCompletions, onError: onError }), failure === null ? null : (_jsxs("p", { role: "status", className: "tai-field-hint", style: { margin: 0 }, children: [_jsx(AlertTriangleIcon, {}), `Suggestions are unavailable: ${failure}`] }))] }));
64
68
  }
65
69
  /**
66
- * An expression-annotated string field, rendered as `JqField`: a multiline
67
- * resting control with the always-present visual-editor door. `JqField` brings
68
- * its own label/description/error chrome (a11y-linked slots), so it is NOT
69
- * wrapped in the form's `Field` component — the annotation's descriptor fields
70
- * map onto jq-studio's input-shape descriptor, and the form's per-field error
71
- * feeds the `error` prop.
70
+ * An expression-annotated string field, rendered through the injected door: a
71
+ * multiline resting control with the door's own visual-editor button. The door
72
+ * brings its own label/description/error chrome (a11y-linked slots), so it is NOT
73
+ * wrapped in the form's `Field` component — the annotation's descriptor fields map
74
+ * onto the input-shape descriptor, and the form's per-field error feeds `error`.
72
75
  *
73
- * Deliberately unwired:
74
- * - `serverValidate` — no author-time validation endpoint applies to a
75
- * schema-declared field (the WASM runtime still powers the Test panel locally).
76
- * - `onEditorOpenChange` — the hosts that render `SchemaForm` register no global
77
- * keyboard shortcuts, so there is nothing to mute while the editor is open.
78
- * - `compact` — the form renders every sibling field with a visible label;
79
- * the compact variant (visually-hidden label, icon-only door) is for dense
80
- * host rows, which the schema form does not have.
76
+ * The door is rendered as an ELEMENT, never called as a function, so its hooks and
77
+ * state (editor open, worker handle) belong to it and survive re-renders of this
78
+ * field.
79
+ *
80
+ * It mounts inside a `Suspense` boundary because a host is free to inject a `lazy`
81
+ * door to keep the jq subgraph in a split chunk of ITS OWN bundle. The fallback
82
+ * paints the resting shell — label/description/error chrome around the current
83
+ * value in a read-only multiline control — so the field holds its layout and keeps
84
+ * the value visible while that chunk resolves, and the swap does not flash. A door
85
+ * injected eagerly never suspends and renders straight through.
86
+ *
87
+ * The form passes only the props the field owns; a jq door's `serverValidate`,
88
+ * `onEditorOpenChange`, and `compact` stay unwired, because no author-time
89
+ * validation endpoint applies to a schema-declared field, the hosts that render
90
+ * `SchemaForm` register no global shortcuts to mute, and every sibling field shows
91
+ * a visible label (the compact variant is for dense host rows).
81
92
  */
82
- function JqExpressionField({ heading, description, error, expression, argName, value, onChange, }) {
83
- // Memoised: the descriptor's identity feeds jq-studio's own memoisation, so a
93
+ function ExpressionField({ component: Door, heading, description, error, expression, argName, value, onChange, }) {
94
+ // Memoised: the descriptor's identity feeds the door's own memoisation, so a
84
95
  // fresh object each keystroke would defeat it.
85
96
  const shape = useMemo(() => expressionShape(expression, argName), [expression, argName]);
86
- return (_jsx(JqField, { label: heading, description: description, error: error, shape: shape, multiline: true, value: value, onChange: onChange }));
97
+ return (_jsx(Suspense, { fallback: _jsx(ExpressionFieldSkeleton, { heading: heading, description: description, error: error, value: value }), children: _jsx(Door, { label: heading, description: description, error: error, shape: shape, multiline: true, value: value, onChange: onChange }) }));
98
+ }
99
+ /**
100
+ * The resting shell shown while a lazily-injected door resolves. It mirrors the
101
+ * live door's footprint — the same label/description/error chrome wrapping a
102
+ * multiline control seeded with the current value — but the control is inert
103
+ * (read-only, `aria-busy`) because there is nothing to edit yet. Matching the
104
+ * footprint is what keeps the Suspense swap from shifting layout or flashing.
105
+ */
106
+ function ExpressionFieldSkeleton({ heading, description, error, value, }) {
107
+ return (_jsx(Field, { label: heading, description: description, error: error, children: _jsx(Textarea, { value: value, readOnly: true, "aria-busy": "true" }) }));
87
108
  }
88
109
  /**
89
- * Map a classified expression annotation onto jq-studio's input-shape
90
- * descriptor. A bare annotation (`language` only) maps to NO descriptor — the
91
- * undeclared-shape `JqField` is the honest rendering when the server said
92
- * nothing about `.`. When any descriptor field is present, the required
93
- * descriptor members the annotation omits fall back to neutral values rather
94
- * than invented copy.
110
+ * Map a classified expression annotation onto the door's input-shape descriptor.
111
+ * A bare annotation (`language` only) maps to NO descriptor — an undeclared shape
112
+ * is the honest rendering when the server said nothing about `.`. When any
113
+ * descriptor field is present, the required descriptor members the annotation
114
+ * omits fall back to neutral values rather than invented copy.
95
115
  */
96
116
  function expressionShape(expression, argName) {
97
117
  const declared = expression.label !== undefined ||
@@ -1 +1 @@
1
- {"version":3,"file":"string-field.js","sourceRoot":"","sources":["../../src/schema-form/string-field.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,OAAO,EAA+B,MA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0E;QAC1E,EAAE,EAAE,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,qBAAqB,OAAO,EAAE;QACzE,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,OAAO;QAClC,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,EAAE;QAC7B,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,EAAE;QAC3B,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,EAAE;QACjC,GAAG,CAAC,UAAU,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC;QAC5E,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC/D,CAAC;AACJ,CAAC;AAED,MAAM,kBAAkB,GAA2B;IACjD,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,eAAe,EAAE,KAAK;IACtB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,gBAAgB;IAC7B,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,SAAS,eAAe,CAAC,MAA0B;IACjD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,OAAO,kBAAkB,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC;AAC9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tai42/studio-sdk",
3
- "version": "9.2.0",
3
+ "version": "9.3.0",
4
4
  "description": "The Studio plugin contract, shared UI components, and hooks that every feature builds on.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "tai42 <oss@tai42.ai>",
@@ -44,6 +44,10 @@
44
44
  "types": "./dist/testing.d.ts",
45
45
  "import": "./dist/testing.js"
46
46
  },
47
+ "./schema-form": {
48
+ "types": "./dist/schema-form/index.d.ts",
49
+ "import": "./dist/schema-form/index.js"
50
+ },
47
51
  "./tokens.css": "./dist/components/tokens.css",
48
52
  "./fonts.css": "./dist/components/fonts.css",
49
53
  "./components.css": "./dist/components/components.css",
@@ -91,7 +95,7 @@
91
95
  "@radix-ui/react-tabs": "^1.1.16",
92
96
  "@radix-ui/react-tooltip": "^1.2.11",
93
97
  "@tai42/jq-studio": "^0.1.3",
94
- "@tai42/api-client": "9.2.0"
98
+ "@tai42/api-client": "9.3.0"
95
99
  },
96
100
  "scripts": {
97
101
  "build": "tsc -b tsconfig.build.json && node scripts/copy-assets.mjs",
@@ -99,7 +103,7 @@
99
103
  "lint": "eslint src scripts --max-warnings 0",
100
104
  "format:check": "prettier --check \"src/**/*.{ts,tsx,css}\" \"scripts/**/*.mjs\"",
101
105
  "test": "vitest run",
102
- "api:check": "api-extractor run --config config/api-extractor.index.json && api-extractor run --config config/api-extractor.host.json && api-extractor run --config config/api-extractor.testing.json",
103
- "api:update": "api-extractor run --local --config config/api-extractor.index.json && api-extractor run --local --config config/api-extractor.host.json && api-extractor run --local --config config/api-extractor.testing.json"
106
+ "api:check": "api-extractor run --config config/api-extractor.index.json && api-extractor run --config config/api-extractor.host.json && api-extractor run --config config/api-extractor.testing.json && api-extractor run --config config/api-extractor.schema-form.json",
107
+ "api:update": "api-extractor run --local --config config/api-extractor.index.json && api-extractor run --local --config config/api-extractor.host.json && api-extractor run --local --config config/api-extractor.testing.json && api-extractor run --local --config config/api-extractor.schema-form.json"
104
108
  }
105
109
  }
package/src/index.ts CHANGED
@@ -372,6 +372,12 @@ export type { IconProps, IconComponent } from './components/icons';
372
372
  export {
373
373
  SchemaForm,
374
374
  RecordEntryRendererContext,
375
+ // The expression-door injection point: a host that wants `x-tai42-expression`
376
+ // fields to author through the visual editor hands `JqField` to a form (the
377
+ // `expressionField` prop) or mounts this context above its tree. A form with no
378
+ // door renders those fields as plain string inputs and stays free of the jq
379
+ // subgraph — the editor, its worker, and its wasm — entirely.
380
+ ExpressionFieldContext,
375
381
  SecretRefField,
376
382
  defaultValueForSchema,
377
383
  validateAgainstSchema,
@@ -382,6 +388,10 @@ export type {
382
388
  CompletionProvider,
383
389
  RecordEntryRenderer,
384
390
  RecordEntryContext,
391
+ ExpressionFieldComponent,
392
+ ExpressionFieldProps,
393
+ ExpressionInputShape,
394
+ ExpressionInputKey,
385
395
  SecretRefFieldProps,
386
396
  SecretRef,
387
397
  JsonSchema,
package/src/jq.ts CHANGED
@@ -6,6 +6,14 @@
6
6
  * the drop-in `JqField`, the lower-level `JqEditorDialog`, the agnostic
7
7
  * field-declaration contract, and the runtime loader/worker helpers.
8
8
  *
9
+ * NOTHING IN THE SDK IMPORTS THIS MODULE. Every edge to it runs the other way: a
10
+ * host imports `JqField` from here and hands it in — to a `SchemaForm` through its
11
+ * `expressionField` prop or the ambient `ExpressionFieldContext`, or straight into
12
+ * its own JSX. That is what keeps this heavy subgraph — the visual editor, its
13
+ * worker file, and its wasm engine — OUT of the bundle of a consumer that imports
14
+ * the SDK for anything else; a bundler emits a dynamic import's chunks as surely
15
+ * as a static import's, so `lazy` inside the SDK would not have kept them out.
16
+ *
9
17
  * BUNDLE + WORKER SHARING. A plugin bundle externalises `@tai42/studio-sdk`, so
10
18
  * the SDK — and the one copy of `@tai42/jq-studio` it carries — ships once for the
11
19
  * whole deployment. A plugin that renders `JqField` shares the host's single jq
@@ -32,10 +32,26 @@
32
32
  * validator ignores it); these client-side caps are UX guards, and the SERVER
33
33
  * MUST independently validate the decoded size. The base64 decoding and cap
34
34
  * checks live in the sibling `media` module.
35
+ *
36
+ * EXPRESSION FIELDS ARE OPT-IN. A string field carrying `x-tai42-expression`
37
+ * renders an expression-authoring door — the SDK's `JqField` — only when the host
38
+ * INJECTS one, through {@link SchemaFormProps.expressionField} or the ambient
39
+ * {@link ExpressionFieldContext}; with no door it renders the plain string input.
40
+ * The form owns no edge to the door: importing it here, even dynamically behind
41
+ * `lazy`, would EMIT the visual editor, its worker file, and a multi-megabyte wasm
42
+ * engine into every consumer that bundles the SDK to render forms, whether or not
43
+ * a form ever authors an expression. Injection puts that weight on the hosts that
44
+ * want it and only there.
35
45
  */
36
46
  import type { ReactNode } from 'react';
47
+ import { useContext } from 'react';
37
48
 
38
- import { CompletionProviderContext, MaxUploadBytesContext } from './context';
49
+ import type { ExpressionFieldComponent } from './context';
50
+ import {
51
+ CompletionProviderContext,
52
+ ExpressionFieldContext,
53
+ MaxUploadBytesContext,
54
+ } from './context';
39
55
  import { FieldNode } from './field-node';
40
56
  import { DEFAULT_MAX_UPLOAD_BYTES } from './media';
41
57
  import { stackClass } from './styles';
@@ -70,6 +86,14 @@ export interface SchemaFormProps {
70
86
  * absent both, {@link DEFAULT_MAX_UPLOAD_BYTES} applies.
71
87
  */
72
88
  readonly maxUploadBytes?: number;
89
+ /**
90
+ * Optional. The expression-authoring door for `x-tai42-expression` fields —
91
+ * the SDK's `JqField`, which the host imports directly and passes here (see
92
+ * the module doc-comment). Omitted, the enclosing
93
+ * {@link ExpressionFieldContext} supplies it; absent both, an annotated field
94
+ * renders the plain string input.
95
+ */
96
+ readonly expressionField?: ExpressionFieldComponent;
73
97
  }
74
98
 
75
99
  /**
@@ -84,23 +108,30 @@ export function SchemaForm({
84
108
  idPrefix = 'schema-form',
85
109
  completionProvider,
86
110
  maxUploadBytes = DEFAULT_MAX_UPLOAD_BYTES,
111
+ expressionField,
87
112
  }: SchemaFormProps): ReactNode {
113
+ // The prop overrides the ambient door for this form only; omitted, the
114
+ // enclosing one flows through unchanged (providing `undefined` would BLIND the
115
+ // form to a door the host wired above it).
116
+ const ambientExpressionField = useContext(ExpressionFieldContext);
88
117
  return (
89
118
  <CompletionProviderContext.Provider value={completionProvider}>
90
119
  <MaxUploadBytesContext.Provider value={maxUploadBytes}>
91
- <div className={stackClass} data-testid={idPrefix}>
92
- <FieldNode
93
- schema={schema}
94
- root={schema}
95
- value={value}
96
- onChange={onChange}
97
- path=""
98
- label={undefined}
99
- required
100
- errors={errors}
101
- idPrefix={idPrefix}
102
- />
103
- </div>
120
+ <ExpressionFieldContext.Provider value={expressionField ?? ambientExpressionField}>
121
+ <div className={stackClass} data-testid={idPrefix}>
122
+ <FieldNode
123
+ schema={schema}
124
+ root={schema}
125
+ value={value}
126
+ onChange={onChange}
127
+ path=""
128
+ label={undefined}
129
+ required
130
+ errors={errors}
131
+ idPrefix={idPrefix}
132
+ />
133
+ </div>
134
+ </ExpressionFieldContext.Provider>
104
135
  </MaxUploadBytesContext.Provider>
105
136
  </CompletionProviderContext.Provider>
106
137
  );
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * Ambient React contexts for the schema-form tree: the optional argument
3
- * completion provider and the default media-upload byte cap. A field deep in the
4
- * tree reads these here rather than every intermediate node drilling the prop.
3
+ * completion provider, the default media-upload byte cap, the record-entry value
4
+ * renderer, and the expression-field door. A field deep in the tree reads these
5
+ * here rather than every intermediate node drilling the prop.
5
6
  */
6
7
  import { createContext } from 'react';
7
- import type { ReactNode } from 'react';
8
+ import type { ComponentType, ReactNode } from 'react';
8
9
 
9
10
  import { DEFAULT_MAX_UPLOAD_BYTES } from './media';
10
11
  import type { CompletionProvider } from './SchemaForm';
@@ -44,3 +45,85 @@ export type RecordEntryRenderer = (entry: RecordEntryContext) => ReactNode;
44
45
  // Ambient record-entry value renderer for the whole form; the record field reads
45
46
  // it here so intermediate object/array/record nodes never drill the prop.
46
47
  export const RecordEntryRendererContext = createContext<RecordEntryRenderer | undefined>(undefined);
48
+
49
+ /** One top-level key of the expression's input document, with a one-line gloss. */
50
+ export interface ExpressionInputKey {
51
+ readonly name: string;
52
+ readonly gloss: string;
53
+ }
54
+
55
+ /**
56
+ * What `.` IS for an expression-annotated field, as the form hands it to the
57
+ * injected door. Built by the renderer from the schema's `x-tai42-expression`
58
+ * annotation.
59
+ *
60
+ * Like the annotation type it is built from, this MIRRORS jq-studio's input-shape
61
+ * descriptor without importing it: the schema-form tree names no jq type, in code
62
+ * OR in its declarations, which is what keeps a consumer that never injects a door
63
+ * free of the jq subgraph. `JqField` satisfies it structurally; a test pins that.
64
+ */
65
+ export interface ExpressionInputShape {
66
+ /** Stable, host-namespaced id, opaque to the door (memoisation/telemetry). */
67
+ readonly id: string;
68
+ /** Short chip label — what `.` is here, e.g. "node envelope". */
69
+ readonly label: string;
70
+ /** One sentence: what `.` is in this field. */
71
+ readonly blurb: string;
72
+ /** The top-level keys of `.`, each with a one-liner. */
73
+ readonly keys: readonly ExpressionInputKey[];
74
+ /** What the expression must RETURN, e.g. "true or false". */
75
+ readonly returns: string;
76
+ /** Per-field caveats. */
77
+ readonly caveats?: readonly string[];
78
+ /** A static skeleton of `.` for the door's test surface. */
79
+ readonly sample?: unknown;
80
+ }
81
+
82
+ /**
83
+ * Exactly the props the form hands an injected expression field — no more, so any
84
+ * expression editor can satisfy the contract, and no less, so the form is free to
85
+ * pass all of them. The label/description/error slots are the door's own chrome:
86
+ * an expression field brings its a11y-linked label and helper slots, so the form
87
+ * does NOT wrap it in the usual `Field`.
88
+ */
89
+ export interface ExpressionFieldProps {
90
+ readonly label: string;
91
+ readonly value: string;
92
+ readonly onChange: (value: string) => void;
93
+ readonly description?: ReactNode;
94
+ readonly error?: ReactNode;
95
+ readonly shape?: ExpressionInputShape;
96
+ /** Render a multiline resting control; the form always asks for one. */
97
+ readonly multiline?: boolean;
98
+ }
99
+
100
+ /**
101
+ * The expression-authoring door a host INJECTS into the form — `JqField`, imported
102
+ * by the host straight from the SDK's jq surface.
103
+ *
104
+ * It is a COMPONENT, rendered as an element, never called as a function: the door
105
+ * owns hooks and state (editor open, worker handle), which only survive as its own
106
+ * element identity. A host may inject a `lazy` door to keep the jq subgraph in a
107
+ * split chunk — the form mounts it inside a Suspense boundary that paints the
108
+ * resting shell while that chunk resolves.
109
+ */
110
+ // The injected reference must be STABLE across renders (a module-level
111
+ // component or memoized value): an inline arrow remounts the door — and drops
112
+ // its open-editor state — on every parent render.
113
+ export type ExpressionFieldComponent = ComponentType<ExpressionFieldProps>;
114
+
115
+ /**
116
+ * The ambient door for the whole form. Absent (the default), an
117
+ * expression-annotated field renders the PLAIN string input, byte-identically to
118
+ * an unannotated one — the jq authoring door is opt-in, because the dynamic import
119
+ * that would fetch it on demand still EMITS its chunks, worker, and wasm into
120
+ * every consumer that bundles the SDK.
121
+ *
122
+ * A host wires it ONCE above its tree (`SchemaEditor`'s preview and
123
+ * `ElicitationForm` render forms a caller does not own the props of, and a plugin
124
+ * page renders its own); the form's own `expressionField` prop overrides it for a
125
+ * single form.
126
+ */
127
+ export const ExpressionFieldContext = createContext<ExpressionFieldComponent | undefined>(
128
+ undefined,
129
+ );
@@ -3,11 +3,43 @@
3
3
  * the tools and interactions features. Public surface: the `SchemaForm`
4
4
  * component plus the value/validation helpers a caller needs to seed, validate,
5
5
  * and submit.
6
+ *
7
+ * THE JQ-FREE ENTRY POINT. This module is published as
8
+ * `@tai42/studio-sdk/schema-form`, and a consumer that BUNDLES the SDK — a
9
+ * standalone widget rather than a host serving the SDK as a shared module —
10
+ * should import the form from here rather than from the package barrel. The
11
+ * barrel re-exports `JqField` off `@tai42/jq-studio`, and a bundler emits that
12
+ * package's Web Worker file and wasm engine from the mere presence of the
13
+ * MODULE in the graph: those assets are emitted while the module is transformed,
14
+ * before tree-shaking can drop the unused re-export. Reaching the form through
15
+ * this entry point, and injecting the door only where it is wanted (see
16
+ * `SchemaForm`'s `expressionField`), is what holds a form-only consumer at zero
17
+ * jq bytes.
18
+ *
19
+ * The design system reaches this entry point through relative imports, so the
20
+ * form renders complete; only the barrel's three CSS side-effect imports stay
21
+ * behind. A consumer importing from here loads the stylesheets it wants
22
+ * explicitly (`@tai42/studio-sdk/tokens.css` and `…/components.css`, plus
23
+ * `…/fonts.css` if it wants the bundled faces).
24
+ *
25
+ * For a BUNDLING consumer only. The shell and every Studio plugin externalise
26
+ * `@tai42/studio-sdk` and resolve it through the served import map, so they must
27
+ * keep importing the barrel: an import map that serves the barrel alone would
28
+ * leave this subpath to be bundled, and the second copy's contexts — the
29
+ * completion provider, the injected expression door — would be different objects
30
+ * from the ones the host provides.
6
31
  */
7
32
  export { SchemaForm } from './SchemaForm';
8
33
  export type { SchemaFormProps, CompletionProvider } from './SchemaForm';
9
34
  export { RecordEntryRendererContext } from './context';
10
35
  export type { RecordEntryRenderer, RecordEntryContext } from './context';
36
+ export { ExpressionFieldContext } from './context';
37
+ export type {
38
+ ExpressionFieldComponent,
39
+ ExpressionFieldProps,
40
+ ExpressionInputShape,
41
+ ExpressionInputKey,
42
+ } from './context';
11
43
  export { SecretRefField } from './SecretRefField';
12
44
  export type { SecretRefFieldProps, SecretRef } from './SecretRefField';
13
45
  export { defaultValueForSchema } from './default-value';
@@ -1,26 +1,33 @@
1
1
  /**
2
2
  * The string field renderer. A plain string renders as a text input (its
3
3
  * `type` derived from any JSON-Schema `format`); an expression-annotated schema
4
- * renders the jq field (a resting textarea with the visual-editor door); a
5
- * media-annotated schema renders the upload control instead; and when the form
6
- * supplies a completion provider, the input is backed by argument autocomplete.
4
+ * renders the INJECTED expression door (a resting textarea with the visual-editor
5
+ * button) when the host supplies one; a media-annotated schema renders the upload
6
+ * control instead; and when the form supplies a completion provider, the input is
7
+ * backed by argument autocomplete.
7
8
  *
8
- * `JqField` is imported through the SDK's own `./jq` re-export — the ONE
9
- * `@tai42/jq-studio` instance the whole deployment shares — never from
10
- * `@tai42/jq-studio` directly, which would bundle a second copy and orphan its
11
- * worker (see the `jq` module doc-comment).
9
+ * NO JQ EDGE. This module — and every module under `schema-form` — names no jq
10
+ * type and imports the SDK's `../jq` re-export neither statically NOR dynamically.
11
+ * The jq authoring door drags a heavy subgraph (the xyflow visual editor, a Web
12
+ * Worker entry, and a multi-megabyte wasm engine), and a bundler EMITS that whole
13
+ * subgraph for a dynamic import just as it does for a static one — `lazy` defers
14
+ * the FETCH, never the emission. A consumer that bundles the SDK to render forms
15
+ * would still ship the chunks, the worker file, and the wasm it can never run.
16
+ * So the door arrives from the host instead, through
17
+ * {@link ExpressionFieldContext} (or the form's `expressionField` prop), and an
18
+ * annotated field with no injected door falls back to the plain string input.
12
19
  */
13
20
  import type { ReactNode } from 'react';
14
- import { useCallback, useContext, useMemo, useState } from 'react';
21
+ import { Suspense, useCallback, useContext, useMemo, useState } from 'react';
15
22
 
16
23
  import { CompletionInput } from '../components/completion-input';
17
24
  import { Field } from '../components/field';
18
25
  import { AlertTriangleIcon } from '../components/icons';
19
- import { TextInput } from '../components/inputs';
26
+ import { TextInput, Textarea } from '../components/inputs';
20
27
  import { errorMessage } from '../errors';
21
- import { JqField, type JqInputShapeDescriptor } from '../jq';
22
28
  import type { ExpressionAnnotation, MediaUpload } from './classify';
23
- import { CompletionProviderContext } from './context';
29
+ import type { ExpressionFieldComponent, ExpressionInputShape } from './context';
30
+ import { CompletionProviderContext, ExpressionFieldContext } from './context';
24
31
  import { MediaField } from './media-field';
25
32
  import type { CompletionProvider } from './SchemaForm';
26
33
 
@@ -48,6 +55,7 @@ export function StringField({
48
55
  onChange: (value: unknown) => void;
49
56
  }): ReactNode {
50
57
  const completionProvider = useContext(CompletionProviderContext);
58
+ const expressionField = useContext(ExpressionFieldContext);
51
59
  const current = typeof value === 'string' ? value : '';
52
60
  // An empty optional field emits `undefined` (drops the key); a required one
53
61
  // keeps the empty string so validation can flag it.
@@ -55,15 +63,20 @@ export function StringField({
55
63
  onChange(next === '' && !required ? undefined : next);
56
64
  };
57
65
 
58
- // An expression-annotated field renders the jq field — the resting control plus
59
- // the visual-editor door. Checked before `media` because the expression
66
+ // An expression-annotated field renders the injected door — the resting control
67
+ // plus its visual-editor button. Checked before `media` because the expression
60
68
  // annotation is the more specific, deliberate opt-in (`x-tai42-expression`);
61
- // a schema carrying both is contradictory, and a jq expression is text, not an
69
+ // a schema carrying both is contradictory, and an expression is text, not an
62
70
  // upload. Not reachable together with the completion provider path: an
63
71
  // expression is authored, not completed from server suggestions.
64
- if (expression !== undefined) {
72
+ //
73
+ // With no door injected the annotation is INERT: the field falls through to the
74
+ // ordinary paths below, exactly as a malformed annotation does, so a form
75
+ // renders the same bytes either way.
76
+ if (expression !== undefined && expressionField !== undefined) {
65
77
  return (
66
- <JqExpressionField
78
+ <ExpressionField
79
+ component={expressionField}
67
80
  heading={heading}
68
81
  description={description}
69
82
  error={error}
@@ -176,23 +189,31 @@ function CompletionField({
176
189
  }
177
190
 
178
191
  /**
179
- * An expression-annotated string field, rendered as `JqField`: a multiline
180
- * resting control with the always-present visual-editor door. `JqField` brings
181
- * its own label/description/error chrome (a11y-linked slots), so it is NOT
182
- * wrapped in the form's `Field` component — the annotation's descriptor fields
183
- * map onto jq-studio's input-shape descriptor, and the form's per-field error
184
- * feeds the `error` prop.
192
+ * An expression-annotated string field, rendered through the injected door: a
193
+ * multiline resting control with the door's own visual-editor button. The door
194
+ * brings its own label/description/error chrome (a11y-linked slots), so it is NOT
195
+ * wrapped in the form's `Field` component — the annotation's descriptor fields map
196
+ * onto the input-shape descriptor, and the form's per-field error feeds `error`.
185
197
  *
186
- * Deliberately unwired:
187
- * - `serverValidate` — no author-time validation endpoint applies to a
188
- * schema-declared field (the WASM runtime still powers the Test panel locally).
189
- * - `onEditorOpenChange` — the hosts that render `SchemaForm` register no global
190
- * keyboard shortcuts, so there is nothing to mute while the editor is open.
191
- * - `compact` — the form renders every sibling field with a visible label;
192
- * the compact variant (visually-hidden label, icon-only door) is for dense
193
- * host rows, which the schema form does not have.
198
+ * The door is rendered as an ELEMENT, never called as a function, so its hooks and
199
+ * state (editor open, worker handle) belong to it and survive re-renders of this
200
+ * field.
201
+ *
202
+ * It mounts inside a `Suspense` boundary because a host is free to inject a `lazy`
203
+ * door to keep the jq subgraph in a split chunk of ITS OWN bundle. The fallback
204
+ * paints the resting shell — label/description/error chrome around the current
205
+ * value in a read-only multiline control — so the field holds its layout and keeps
206
+ * the value visible while that chunk resolves, and the swap does not flash. A door
207
+ * injected eagerly never suspends and renders straight through.
208
+ *
209
+ * The form passes only the props the field owns; a jq door's `serverValidate`,
210
+ * `onEditorOpenChange`, and `compact` stay unwired, because no author-time
211
+ * validation endpoint applies to a schema-declared field, the hosts that render
212
+ * `SchemaForm` register no global shortcuts to mute, and every sibling field shows
213
+ * a visible label (the compact variant is for dense host rows).
194
214
  */
195
- function JqExpressionField({
215
+ function ExpressionField({
216
+ component: Door,
196
217
  heading,
197
218
  description,
198
219
  error,
@@ -201,6 +222,7 @@ function JqExpressionField({
201
222
  value,
202
223
  onChange,
203
224
  }: {
225
+ component: ExpressionFieldComponent;
204
226
  heading: string;
205
227
  description: string | undefined;
206
228
  error: string | undefined;
@@ -209,34 +231,69 @@ function JqExpressionField({
209
231
  value: string;
210
232
  onChange: (value: string) => void;
211
233
  }): ReactNode {
212
- // Memoised: the descriptor's identity feeds jq-studio's own memoisation, so a
234
+ // Memoised: the descriptor's identity feeds the door's own memoisation, so a
213
235
  // fresh object each keystroke would defeat it.
214
236
  const shape = useMemo(() => expressionShape(expression, argName), [expression, argName]);
215
237
  return (
216
- <JqField
217
- label={heading}
218
- description={description}
219
- error={error}
220
- shape={shape}
221
- multiline
222
- value={value}
223
- onChange={onChange}
224
- />
238
+ <Suspense
239
+ fallback={
240
+ <ExpressionFieldSkeleton
241
+ heading={heading}
242
+ description={description}
243
+ error={error}
244
+ value={value}
245
+ />
246
+ }
247
+ >
248
+ <Door
249
+ label={heading}
250
+ description={description}
251
+ error={error}
252
+ shape={shape}
253
+ multiline
254
+ value={value}
255
+ onChange={onChange}
256
+ />
257
+ </Suspense>
258
+ );
259
+ }
260
+
261
+ /**
262
+ * The resting shell shown while a lazily-injected door resolves. It mirrors the
263
+ * live door's footprint — the same label/description/error chrome wrapping a
264
+ * multiline control seeded with the current value — but the control is inert
265
+ * (read-only, `aria-busy`) because there is nothing to edit yet. Matching the
266
+ * footprint is what keeps the Suspense swap from shifting layout or flashing.
267
+ */
268
+ function ExpressionFieldSkeleton({
269
+ heading,
270
+ description,
271
+ error,
272
+ value,
273
+ }: {
274
+ heading: string;
275
+ description: string | undefined;
276
+ error: string | undefined;
277
+ value: string;
278
+ }): ReactNode {
279
+ return (
280
+ <Field label={heading} description={description} error={error}>
281
+ <Textarea value={value} readOnly aria-busy="true" />
282
+ </Field>
225
283
  );
226
284
  }
227
285
 
228
286
  /**
229
- * Map a classified expression annotation onto jq-studio's input-shape
230
- * descriptor. A bare annotation (`language` only) maps to NO descriptor — the
231
- * undeclared-shape `JqField` is the honest rendering when the server said
232
- * nothing about `.`. When any descriptor field is present, the required
233
- * descriptor members the annotation omits fall back to neutral values rather
234
- * than invented copy.
287
+ * Map a classified expression annotation onto the door's input-shape descriptor.
288
+ * A bare annotation (`language` only) maps to NO descriptor — an undeclared shape
289
+ * is the honest rendering when the server said nothing about `.`. When any
290
+ * descriptor field is present, the required descriptor members the annotation
291
+ * omits fall back to neutral values rather than invented copy.
235
292
  */
236
293
  function expressionShape(
237
294
  expression: ExpressionAnnotation,
238
295
  argName: string,
239
- ): JqInputShapeDescriptor | undefined {
296
+ ): ExpressionInputShape | undefined {
240
297
  const declared =
241
298
  expression.label !== undefined ||
242
299
  expression.blurb !== undefined ||