@tai42/studio-sdk 6.1.1 → 7.0.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/dist/components/completion-input.d.ts.map +1 -1
- package/dist/components/completion-input.js +19 -2
- package/dist/components/completion-input.js.map +1 -1
- package/dist/components/components.css +4 -3
- package/dist/components/explorer-view.d.ts.map +1 -1
- package/dist/components/explorer-view.js +11 -22
- package/dist/components/explorer-view.js.map +1 -1
- package/dist/components/field.d.ts +14 -1
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +5 -2
- package/dist/components/field.js.map +1 -1
- package/dist/components/open-target.d.ts +68 -0
- package/dist/components/open-target.d.ts.map +1 -0
- package/dist/components/open-target.js +48 -0
- package/dist/components/open-target.js.map +1 -0
- package/dist/expression/ExpressionField.d.ts +140 -0
- package/dist/expression/ExpressionField.d.ts.map +1 -0
- package/dist/expression/ExpressionField.js +88 -0
- package/dist/expression/ExpressionField.js.map +1 -0
- package/dist/expression/context.d.ts +50 -0
- package/dist/expression/context.d.ts.map +1 -0
- package/dist/expression/context.js +53 -0
- package/dist/expression/context.js.map +1 -0
- package/dist/expression/types.d.ts +157 -0
- package/dist/expression/types.d.ts.map +1 -0
- package/dist/expression/types.js +11 -0
- package/dist/expression/types.js.map +1 -0
- package/dist/hooks/useApi.d.ts +8 -0
- package/dist/hooks/useApi.d.ts.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin/registry.d.ts.map +1 -1
- package/dist/plugin/registry.js +39 -1
- package/dist/plugin/registry.js.map +1 -1
- package/dist/plugin/types.d.ts +31 -0
- package/dist/plugin/types.d.ts.map +1 -1
- package/dist/schema-editor/SchemaEditor.d.ts.map +1 -1
- package/dist/schema-editor/SchemaEditor.js +8 -4
- package/dist/schema-editor/SchemaEditor.js.map +1 -1
- package/dist/schema-form/classify.d.ts +5 -3
- package/dist/schema-form/classify.d.ts.map +1 -1
- package/dist/schema-form/classify.js +42 -16
- package/dist/schema-form/classify.js.map +1 -1
- package/dist/schema-form/default-value.d.ts.map +1 -1
- package/dist/schema-form/default-value.js +4 -1
- package/dist/schema-form/default-value.js.map +1 -1
- package/dist/schema-form/field-node.d.ts.map +1 -1
- package/dist/schema-form/field-node.js +3 -3
- package/dist/schema-form/field-node.js.map +1 -1
- package/dist/schema-form/json-field.d.ts +14 -0
- package/dist/schema-form/json-field.d.ts.map +1 -0
- package/dist/schema-form/json-field.js +104 -0
- package/dist/schema-form/json-field.js.map +1 -0
- package/dist/schema-form/types.d.ts +2 -2
- package/dist/schema-form/types.js +2 -2
- package/dist/schema-form/validate.d.ts.map +1 -1
- package/dist/schema-form/validate.js +11 -4
- package/dist/schema-form/validate.js.map +1 -1
- package/package.json +2 -2
- package/src/components/completion-input.tsx +19 -2
- package/src/components/components.css +4 -3
- package/src/components/explorer-view.tsx +16 -27
- package/src/components/field.tsx +20 -2
- package/src/components/open-target.ts +121 -0
- package/src/expression/ExpressionField.tsx +330 -0
- package/src/expression/context.tsx +83 -0
- package/src/expression/types.ts +164 -0
- package/src/index.ts +26 -0
- package/src/plugin/registry.ts +50 -1
- package/src/plugin/types.ts +32 -0
- package/src/schema-editor/SchemaEditor.tsx +8 -4
- package/src/schema-form/classify.ts +103 -18
- package/src/schema-form/default-value.ts +4 -1
- package/src/schema-form/field-node.tsx +7 -4
- package/src/schema-form/json-field.tsx +143 -0
- package/src/schema-form/types.ts +2 -2
- package/src/schema-form/validate.ts +10 -4
- package/dist/schema-form/unsupported-notice.d.ts +0 -18
- package/dist/schema-form/unsupported-notice.d.ts.map +0 -1
- package/dist/schema-form/unsupported-notice.js +0 -8
- package/dist/schema-form/unsupported-notice.js.map +0 -1
- package/src/schema-form/unsupported-notice.tsx +0 -39
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* `ExpressionField` — the SDK's expression-authoring control. It is a plain SDK
|
|
4
|
+
* text field (a `Field` wrapping a `Textarea`, or a `TextInput` when
|
|
5
|
+
* `multiline={false}`) that GROWS a "visual editor" affordance only when a plugin
|
|
6
|
+
* has contributed an editor for the field's language. With no editor registered —
|
|
7
|
+
* or no {@link ExpressionEditorsProvider} mounted above it — it stays exactly a
|
|
8
|
+
* text field, so a consumer adopts it with no dependency on any editor being
|
|
9
|
+
* installed (graceful absence).
|
|
10
|
+
*
|
|
11
|
+
* The launcher half — the button that lazily loads the editor behind `Suspense`,
|
|
12
|
+
* warms its chunk on open-intent, and turns a `load()` rejection into a loud
|
|
13
|
+
* inline error — is the standalone {@link ExpressionEditorLauncher}, exported so a
|
|
14
|
+
* dense grid can compose its OWN input + an icon-only door in one row and reuse
|
|
15
|
+
* this exact mount semantics rather than reimplementing them. `ExpressionField`
|
|
16
|
+
* consumes that same component internally, so there is one source of truth for how
|
|
17
|
+
* an editor is mounted.
|
|
18
|
+
*
|
|
19
|
+
* The interaction is ported from babelfish's `jq-editor-button.tsx` but styled
|
|
20
|
+
* with SDK primitives and generalised to any {@link ExpressionLanguage}: the
|
|
21
|
+
* whole {@link ExpressionFieldDeclaration} threads onto the editor, so its context
|
|
22
|
+
* chip, Test seeding, and server-validate hook all read from one object, and each
|
|
23
|
+
* degrades on its own when absent.
|
|
24
|
+
*/
|
|
25
|
+
import { Suspense, lazy, useMemo, useState, } from 'react';
|
|
26
|
+
import { Button, Spinner } from '../components/primitives';
|
|
27
|
+
import { ErrorBoundary } from '../components/error-boundary';
|
|
28
|
+
import { Field } from '../components/field';
|
|
29
|
+
import { TextInput, Textarea } from '../components/inputs';
|
|
30
|
+
import { GridIcon } from '../components/icons';
|
|
31
|
+
import { useExpressionEditor } from './context';
|
|
32
|
+
/**
|
|
33
|
+
* The launcher + lazily-loaded editor for one expression field, standalone so a
|
|
34
|
+
* compact grid can drop it beside its own input. It resolves the contributed
|
|
35
|
+
* editor for `declaration.language` itself and renders NOTHING when none is
|
|
36
|
+
* registered (or no {@link ExpressionEditorsProvider} is mounted) — the same
|
|
37
|
+
* graceful absence {@link ExpressionField} degrades to a plain text field on.
|
|
38
|
+
*/
|
|
39
|
+
export function ExpressionEditorLauncher({ declaration, value, onSave, fieldLabel, compact = false, editorReadOnly = false, title, }) {
|
|
40
|
+
const contribution = useExpressionEditor(declaration.language);
|
|
41
|
+
const [open, setOpen] = useState(false);
|
|
42
|
+
// A fresh lazy wrapper per contribution: the module resolves once and React
|
|
43
|
+
// caches it, so re-opening the editor does not re-fetch the chunk.
|
|
44
|
+
const LazyEditor = useMemo(() => contribution === null
|
|
45
|
+
? null
|
|
46
|
+
: lazy(() => contribution.load().then((module) => ({ default: module.Editor }))), [contribution]);
|
|
47
|
+
if (contribution === null || LazyEditor === null)
|
|
48
|
+
return null;
|
|
49
|
+
// Warm the chunk on OPEN-INTENT (hover/focus) and again on click, both
|
|
50
|
+
// best-effort: a preload that throws must never block opening the editor, whose
|
|
51
|
+
// own lazy import stays the loud path if the module genuinely cannot load.
|
|
52
|
+
const warm = () => {
|
|
53
|
+
contribution.preload?.();
|
|
54
|
+
};
|
|
55
|
+
const shapeLabel = declaration.shape?.label;
|
|
56
|
+
const openLabel = shapeLabel
|
|
57
|
+
? `Open the visual editor for ${fieldLabel} (input: ${shapeLabel})`
|
|
58
|
+
: `Open the visual editor for ${fieldLabel}`;
|
|
59
|
+
const resolvedTitle = title ?? (shapeLabel ? `Visual editor · input: ${shapeLabel}` : 'Visual editor');
|
|
60
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Button, { type: "button", variant: "secondary", onClick: () => {
|
|
61
|
+
warm();
|
|
62
|
+
setOpen(true);
|
|
63
|
+
}, onMouseEnter: warm, onFocus: warm, "aria-label": openLabel, title: resolvedTitle, children: [_jsx(GridIcon, { "aria-hidden": true }), compact ? null : ' Visual editor'] }), open ? (_jsx(ErrorBoundary, { label: "Visual editor", children: _jsx(Suspense, { fallback: _jsx(Spinner, { label: "Loading the visual editor" }), children: _jsx(LazyEditor, { declaration: declaration, open: true, initialExpression: value, fieldLabel: fieldLabel, readOnly: editorReadOnly, onSave: (expression) => {
|
|
64
|
+
onSave(expression);
|
|
65
|
+
setOpen(false);
|
|
66
|
+
}, onClose: () => {
|
|
67
|
+
setOpen(false);
|
|
68
|
+
} }) }) })) : null] }));
|
|
69
|
+
}
|
|
70
|
+
export function ExpressionField({ label, hideLabel = false, description, error, declaration, value, onChange, disabled = false, editorReadOnly, compact = false, fieldLabel, multiline = true, monospace = true, launcherTitle, rows, placeholder, textareaProps, }) {
|
|
71
|
+
const contribution = useExpressionEditor(declaration.language);
|
|
72
|
+
const monoClassName = monospace
|
|
73
|
+
? multiline
|
|
74
|
+
? 'tai-textarea-mono'
|
|
75
|
+
: 'tai-input-mono'
|
|
76
|
+
: undefined;
|
|
77
|
+
// The editor's read-only state is INDEPENDENT of the textarea's disabled state,
|
|
78
|
+
// but defaults to it so the historical coupling holds for a caller that never
|
|
79
|
+
// asks for the two to differ.
|
|
80
|
+
const resolvedEditorReadOnly = editorReadOnly ?? disabled;
|
|
81
|
+
const control = multiline ? (_jsx(Textarea, { ...textareaProps, value: value, onChange: (event) => {
|
|
82
|
+
onChange(event.target.value);
|
|
83
|
+
}, disabled: disabled, spellCheck: false, rows: rows, placeholder: placeholder, className: monoClassName })) : (_jsx(TextInput, { ...textareaProps, value: value, onChange: (event) => {
|
|
84
|
+
onChange(event.target.value);
|
|
85
|
+
}, disabled: disabled, spellCheck: false, placeholder: placeholder, className: monoClassName }));
|
|
86
|
+
return (_jsxs(Field, { label: label, hideLabel: hideLabel, description: description, error: error, children: [control, contribution !== null ? (_jsx("div", { style: { display: 'flex', justifyContent: 'flex-end', marginTop: 'var(--tai-space-2)' }, children: _jsx(ExpressionEditorLauncher, { declaration: declaration, value: value, onSave: onChange, fieldLabel: fieldLabel ?? label, compact: compact, editorReadOnly: resolvedEditorReadOnly, title: launcherTitle }) })) : null] }));
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=ExpressionField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpressionField.js","sourceRoot":"","sources":["../../src/expression/ExpressionField.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAQ,GAKT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAmDhD;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAC,EACvC,WAAW,EACX,KAAK,EACL,MAAM,EACN,UAAU,EACV,OAAO,GAAG,KAAK,EACf,cAAc,GAAG,KAAK,EACtB,KAAK,GACyB;IAC9B,MAAM,YAAY,GAAG,mBAAmB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/D,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExC,4EAA4E;IAC5E,mEAAmE;IACnE,MAAM,UAAU,GAAG,OAAO,CACxB,GAAG,EAAE,CACH,YAAY,KAAK,IAAI;QACnB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,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,CACH,CAAC,CAAC,CAAC,CACF,KAAC,SAAS,OACJ,aAAa,EACjB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,KAAK,EACjB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,aAAa,GACxB,CACH,CAAC;IAEF,OAAO,CACL,MAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,aAC9E,OAAO,EACP,YAAY,KAAK,IAAI,CAAC,CAAC,CAAC,CACvB,cACE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,oBAAoB,EAAE,YAEvF,KAAC,wBAAwB,IACvB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,QAAQ,EAChB,UAAU,EAAE,UAAU,IAAI,KAAK,EAC/B,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,sBAAsB,EACtC,KAAK,EAAE,aAAa,GACpB,GACE,CACP,CAAC,CAAC,CAAC,IAAI,IACF,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The consumption bridge for contributed expression editors: the SHELL reads the
|
|
3
|
+
* committed contributions from `@tai42/studio-sdk/host` and mounts
|
|
4
|
+
* {@link ExpressionEditorsProvider} high in the tree, so both host features and
|
|
5
|
+
* plugin pages resolve an editor for a language through {@link useExpressionEditor}.
|
|
6
|
+
*
|
|
7
|
+
* WHY A CONTEXT AND NOT A DIRECT REGISTRY READ: the contribution registry lives in
|
|
8
|
+
* the host-only `@tai42/studio-sdk/host` module, which the plugin surface
|
|
9
|
+
* deliberately cannot import — a served plugin bundle must not be able to forge,
|
|
10
|
+
* wipe, or ENUMERATE the registry. React itself is the one import-map singleton
|
|
11
|
+
* both bundles share (the shell externalises `react` and `@tai42/studio-sdk`), so a
|
|
12
|
+
* context provided by the host reaches a plugin page's render. The provider carries
|
|
13
|
+
* the editors as a private context value the plugin surface never exports, and the
|
|
14
|
+
* only door through it is {@link useExpressionEditor}, which resolves ONE language
|
|
15
|
+
* to ONE contribution. A plugin can look up the editor for its own field and no
|
|
16
|
+
* more: it cannot list the languages, count the editors, or mutate the set.
|
|
17
|
+
*
|
|
18
|
+
* ABSENT PROVIDER IS A FIRST-CLASS STATE: a field rendered with no provider above
|
|
19
|
+
* it (a host that never wired the bridge, a test that mounts a field bare) resolves
|
|
20
|
+
* `null` and degrades to a plain text field. That is the graceful-absence contract
|
|
21
|
+
* {@link ExpressionField} relies on, so the hook returns `null` rather than throwing.
|
|
22
|
+
*/
|
|
23
|
+
import { type ReactNode } from 'react';
|
|
24
|
+
import type { ExpressionEditorContribution, ExpressionLanguage } from './types';
|
|
25
|
+
export interface ExpressionEditorsProviderProps {
|
|
26
|
+
/**
|
|
27
|
+
* The committed editor contributions, keyed by language — exactly the shell's
|
|
28
|
+
* `getContributions().expressionEditors`. Passed as the read-only map it already
|
|
29
|
+
* is; the provider never mutates or re-exposes it, and wraps it in a lookup so a
|
|
30
|
+
* consumer can only resolve, never enumerate.
|
|
31
|
+
*/
|
|
32
|
+
readonly editors: ReadonlyMap<string, ExpressionEditorContribution>;
|
|
33
|
+
readonly children: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Publishes the contributed editors to the subtree as a lookup. The shell mounts
|
|
37
|
+
* this once, above both the host feature routes and the plugin pages, with the
|
|
38
|
+
* host registry's `expressionEditors` map. Re-rendering with a new `editors` map
|
|
39
|
+
* (the load pass completing) updates every consumer.
|
|
40
|
+
*/
|
|
41
|
+
export declare function ExpressionEditorsProvider({ editors, children, }: ExpressionEditorsProviderProps): ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve the contributed editor for one expression language, or `null` when none
|
|
44
|
+
* is registered OR no {@link ExpressionEditorsProvider} is mounted above the caller.
|
|
45
|
+
* This is the ONLY way a plugin surface reaches a contributed editor: it cannot
|
|
46
|
+
* enumerate or mutate the registry, only ask for one language. `null` is the
|
|
47
|
+
* graceful-absence signal {@link ExpressionField} renders a plain text field on.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useExpressionEditor(language: ExpressionLanguage): ExpressionEditorContribution | null;
|
|
50
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/expression/context.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1F,OAAO,KAAK,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAYhF,MAAM,WAAW,8BAA8B;IAC7C;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;IACpE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,OAAO,EACP,QAAQ,GACT,EAAE,8BAA8B,GAAG,SAAS,CAW5C;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,kBAAkB,GAC3B,4BAA4B,GAAG,IAAI,CAIrC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The consumption bridge for contributed expression editors: the SHELL reads the
|
|
3
|
+
* committed contributions from `@tai42/studio-sdk/host` and mounts
|
|
4
|
+
* {@link ExpressionEditorsProvider} high in the tree, so both host features and
|
|
5
|
+
* plugin pages resolve an editor for a language through {@link useExpressionEditor}.
|
|
6
|
+
*
|
|
7
|
+
* WHY A CONTEXT AND NOT A DIRECT REGISTRY READ: the contribution registry lives in
|
|
8
|
+
* the host-only `@tai42/studio-sdk/host` module, which the plugin surface
|
|
9
|
+
* deliberately cannot import — a served plugin bundle must not be able to forge,
|
|
10
|
+
* wipe, or ENUMERATE the registry. React itself is the one import-map singleton
|
|
11
|
+
* both bundles share (the shell externalises `react` and `@tai42/studio-sdk`), so a
|
|
12
|
+
* context provided by the host reaches a plugin page's render. The provider carries
|
|
13
|
+
* the editors as a private context value the plugin surface never exports, and the
|
|
14
|
+
* only door through it is {@link useExpressionEditor}, which resolves ONE language
|
|
15
|
+
* to ONE contribution. A plugin can look up the editor for its own field and no
|
|
16
|
+
* more: it cannot list the languages, count the editors, or mutate the set.
|
|
17
|
+
*
|
|
18
|
+
* ABSENT PROVIDER IS A FIRST-CLASS STATE: a field rendered with no provider above
|
|
19
|
+
* it (a host that never wired the bridge, a test that mounts a field bare) resolves
|
|
20
|
+
* `null` and degrades to a plain text field. That is the graceful-absence contract
|
|
21
|
+
* {@link ExpressionField} relies on, so the hook returns `null` rather than throwing.
|
|
22
|
+
*/
|
|
23
|
+
import { createContext, createElement, useContext, useMemo } from 'react';
|
|
24
|
+
const ExpressionEditorsContext = createContext(null);
|
|
25
|
+
/**
|
|
26
|
+
* Publishes the contributed editors to the subtree as a lookup. The shell mounts
|
|
27
|
+
* this once, above both the host feature routes and the plugin pages, with the
|
|
28
|
+
* host registry's `expressionEditors` map. Re-rendering with a new `editors` map
|
|
29
|
+
* (the load pass completing) updates every consumer.
|
|
30
|
+
*/
|
|
31
|
+
export function ExpressionEditorsProvider({ editors, children, }) {
|
|
32
|
+
// Memoised on the `editors` map so the context value keeps a STABLE identity
|
|
33
|
+
// across re-renders that do not change the map — a new closure every render would
|
|
34
|
+
// re-notify every consumer that reads the context (every mounted field) for
|
|
35
|
+
// nothing. The identity turns over exactly when the map does (the load pass
|
|
36
|
+
// committing a new editor), which is the one time consumers must re-resolve.
|
|
37
|
+
const lookup = useMemo(() => (language) => editors.get(language) ?? null, [editors]);
|
|
38
|
+
return createElement(ExpressionEditorsContext.Provider, { value: lookup }, children);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Resolve the contributed editor for one expression language, or `null` when none
|
|
42
|
+
* is registered OR no {@link ExpressionEditorsProvider} is mounted above the caller.
|
|
43
|
+
* This is the ONLY way a plugin surface reaches a contributed editor: it cannot
|
|
44
|
+
* enumerate or mutate the registry, only ask for one language. `null` is the
|
|
45
|
+
* graceful-absence signal {@link ExpressionField} renders a plain text field on.
|
|
46
|
+
*/
|
|
47
|
+
export function useExpressionEditor(language) {
|
|
48
|
+
const lookup = useContext(ExpressionEditorsContext);
|
|
49
|
+
if (lookup === null)
|
|
50
|
+
return null;
|
|
51
|
+
return lookup(language);
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/expression/context.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAY1F,MAAM,wBAAwB,GAAG,aAAa,CAAsB,IAAI,CAAC,CAAC;AAa1E;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,EACxC,OAAO,EACP,QAAQ,GACuB;IAC/B,6EAA6E;IAC7E,kFAAkF;IAClF,4EAA4E;IAC5E,4EAA4E;IAC5E,6EAA6E;IAC7E,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EACjD,CAAC,OAAO,CAAC,CACV,CAAC;IACF,OAAO,aAAa,CAAC,wBAAwB,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC;AACvF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAA4B;IAE5B,MAAM,MAAM,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;IACpD,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The SDK's AGNOSTIC expression-field vocabulary: the language-neutral graduation
|
|
3
|
+
* of babelfish jq-studio's field-declaration surface into the platform SDK, so any
|
|
4
|
+
* Studio consumer (a flow product, a tai42 feature, a third-party plugin) can
|
|
5
|
+
* declare an expression field the SAME way and any plugin can contribute the
|
|
6
|
+
* editor that authors it.
|
|
7
|
+
*
|
|
8
|
+
* A host declares an expression field through these generic types — a language
|
|
9
|
+
* tag, a DESCRIPTOR of what the expression's input document IS (not an enum of
|
|
10
|
+
* shapes the editor hard-codes), a sample-input provider, and a pluggable
|
|
11
|
+
* server-validate hook. Nothing here names anything product-specific, so the same
|
|
12
|
+
* SDK serves flows' node/tool-result envelopes and tai42's webhook-body /
|
|
13
|
+
* auth-context / tool-result shapes without a type change. babelfish's flows
|
|
14
|
+
* adapter retypes its own envelopes onto these; the descriptor fields are kept
|
|
15
|
+
* isomorphic to jq-studio's `JqInputShapeDescriptor` so that mapping is a rename,
|
|
16
|
+
* not a reshape.
|
|
17
|
+
*
|
|
18
|
+
* The editor itself is NOT in the SDK — it is a plugin CONTRIBUTION
|
|
19
|
+
* ({@link ExpressionEditorContribution}), lazily loaded across the plugin
|
|
20
|
+
* boundary. This module is the shared contract both sides retype against.
|
|
21
|
+
*/
|
|
22
|
+
import type { ComponentType } from 'react';
|
|
23
|
+
/**
|
|
24
|
+
* The expression language an expression field authors. `'jq'` is the only language
|
|
25
|
+
* that exists today; the tag is an OPEN string union so a host (or a later plugin)
|
|
26
|
+
* can name another pipeline language without a change to this type. The literal
|
|
27
|
+
* keeps `'jq'` on the autocomplete list while `string` keeps the union open.
|
|
28
|
+
*/
|
|
29
|
+
export type ExpressionLanguage = 'jq' | (string & {});
|
|
30
|
+
/**
|
|
31
|
+
* One top-level key of the expression's input document, with a one-line gloss the
|
|
32
|
+
* editor may surface (a context chip, an input-node body, path suggestions).
|
|
33
|
+
* Graduated from jq-studio's `JqInputKey`.
|
|
34
|
+
*/
|
|
35
|
+
export interface ExpressionInputKey {
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly gloss: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A descriptor of what the expression's input document IS for a field — the shape
|
|
41
|
+
* the expression receives as its root. Deliberately open: a host builds these from
|
|
42
|
+
* its own domain, so ANY envelope is expressible, including ones the editor has
|
|
43
|
+
* never heard of. The `id` is an opaque, host-namespaced string used only for
|
|
44
|
+
* memoisation/telemetry. Graduated from jq-studio's `JqInputShapeDescriptor` with
|
|
45
|
+
* every field isomorphic, so the flows adapter maps its `JQType` onto this without
|
|
46
|
+
* reshaping.
|
|
47
|
+
*/
|
|
48
|
+
export interface ExpressionShapeDescriptor {
|
|
49
|
+
/** Stable, host-namespaced id (opaque to the editor). */
|
|
50
|
+
readonly id: string;
|
|
51
|
+
/** Short chip label — what the input is here, e.g. "node envelope". */
|
|
52
|
+
readonly label: string;
|
|
53
|
+
/** One sentence: what the input document is in this field. */
|
|
54
|
+
readonly blurb: string;
|
|
55
|
+
/** The top-level keys of the input document, each with a one-liner. */
|
|
56
|
+
readonly keys: readonly ExpressionInputKey[];
|
|
57
|
+
/** What the expression must RETURN, e.g. "true or false" | "an object". */
|
|
58
|
+
readonly returns: string;
|
|
59
|
+
/** Per-field caveats (e.g. ".iterate.item is always null in a while condition"). */
|
|
60
|
+
readonly caveats?: readonly string[];
|
|
61
|
+
/** A static skeleton of the input document — the cheap, honest default a Test
|
|
62
|
+
* panel seeds its input with. A host may override it dynamically through the
|
|
63
|
+
* declaration's {@link ExpressionSampleInputProvider}. */
|
|
64
|
+
readonly sample?: unknown;
|
|
65
|
+
}
|
|
66
|
+
/** A provider of a concrete sample input for the editor's Test panel. A function
|
|
67
|
+
* (not a value) so a host can supply a static skeleton now and a live sample
|
|
68
|
+
* later without changing this API. Graduated from jq-studio's
|
|
69
|
+
* `SampleInputProvider`. */
|
|
70
|
+
export type ExpressionSampleInputProvider = () => unknown;
|
|
71
|
+
/** The answer a pluggable validator gives for an expression against its declared
|
|
72
|
+
* shape. Mirrors babelfish `validate_jq`'s result WITHOUT importing its types, so
|
|
73
|
+
* the hook stays host-agnostic. */
|
|
74
|
+
export interface ExpressionValidationResult {
|
|
75
|
+
readonly ok: boolean;
|
|
76
|
+
readonly compiles?: boolean;
|
|
77
|
+
readonly singleEmit?: boolean;
|
|
78
|
+
readonly message?: string;
|
|
79
|
+
}
|
|
80
|
+
/** A pluggable server-validate hook. The editor calls it with the current
|
|
81
|
+
* expression and the sample input; the host routes it to its own validator (flows
|
|
82
|
+
* wires babelfish's `validate_jq` endpoint here). Absent = no server validation
|
|
83
|
+
* (a local runtime may still power the Test panel). Graduated from jq-studio's
|
|
84
|
+
* `ServerValidateHook`. */
|
|
85
|
+
export type ExpressionServerValidate = (args: {
|
|
86
|
+
readonly expression: string;
|
|
87
|
+
readonly sampleInput: unknown;
|
|
88
|
+
}) => Promise<ExpressionValidationResult>;
|
|
89
|
+
/**
|
|
90
|
+
* The declaration a host attaches to an expression field: the language, what the
|
|
91
|
+
* input document is (descriptor), how to sample it, and how to server-validate it.
|
|
92
|
+
* Every property beyond `language` is optional so adoption is incremental — an
|
|
93
|
+
* undeclared-but-for-language field behaves exactly as a plain text field. No
|
|
94
|
+
* property names anything host-specific. Graduated from jq-studio's
|
|
95
|
+
* `JqFieldDeclaration`.
|
|
96
|
+
*/
|
|
97
|
+
export interface ExpressionFieldDeclaration {
|
|
98
|
+
readonly language: ExpressionLanguage;
|
|
99
|
+
readonly shape?: ExpressionShapeDescriptor;
|
|
100
|
+
readonly sampleInput?: ExpressionSampleInputProvider;
|
|
101
|
+
readonly serverValidate?: ExpressionServerValidate;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The props a contributed editor component receives when the field opens it. The
|
|
105
|
+
* WHOLE {@link ExpressionFieldDeclaration} crosses (not just `shape` /
|
|
106
|
+
* `serverValidate`), so the editor reads the input descriptor for its context
|
|
107
|
+
* chip, the sample provider for Test seeding, and the validate hook for its
|
|
108
|
+
* Validate action from one object. `onSave` writes the authored expression back
|
|
109
|
+
* through the field; `onClose` dismisses without saving.
|
|
110
|
+
*/
|
|
111
|
+
export interface ExpressionEditorProps {
|
|
112
|
+
/** What the field feeds and how to sample/validate it (see the type). */
|
|
113
|
+
readonly declaration: ExpressionFieldDeclaration;
|
|
114
|
+
/** Whether the editor is open — the field mounts it only while true. */
|
|
115
|
+
readonly open: boolean;
|
|
116
|
+
/** The field's current expression ('' when unset), the editor seeds itself with. */
|
|
117
|
+
readonly initialExpression: string;
|
|
118
|
+
/** The field label the editor titles itself with. */
|
|
119
|
+
readonly fieldLabel?: string;
|
|
120
|
+
/** Author-blocking: the editor renders read-only (no Save) when true. */
|
|
121
|
+
readonly readOnly?: boolean;
|
|
122
|
+
/** Called with the authored expression when the user saves. */
|
|
123
|
+
readonly onSave: (expression: string) => void;
|
|
124
|
+
/** Called when the user dismisses the editor without saving. */
|
|
125
|
+
readonly onClose: () => void;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The contract version an {@link ExpressionEditorContribution} must target. Bumped
|
|
129
|
+
* only on a BREAKING change to {@link ExpressionEditorProps} or the contribution
|
|
130
|
+
* shape; the registry rejects a contribution whose `contractVersion` is not
|
|
131
|
+
* exactly this, so a host never mounts an editor built against an incompatible
|
|
132
|
+
* props contract. It is distinct from `STUDIO_PLUGIN_API_VERSION`: the plugin API
|
|
133
|
+
* gains this whole extension point ADDITIVELY (that version does not move), and
|
|
134
|
+
* this narrower number then versions the editor props independently.
|
|
135
|
+
*/
|
|
136
|
+
export declare const EXPRESSION_EDITOR_CONTRACT_VERSION = 1;
|
|
137
|
+
/**
|
|
138
|
+
* A plugin's contribution of the editor for one expression language. The editor
|
|
139
|
+
* rides a SEPARATE chunk (a visual canvas, converters, a language runtime), so it
|
|
140
|
+
* is fetched lazily: `load` resolves the module exposing the `Editor` component,
|
|
141
|
+
* and the optional `preload` warms that chunk on open-intent (hover/focus) so the
|
|
142
|
+
* editor is ready by the time the user opens it. `contractVersion` must equal
|
|
143
|
+
* {@link EXPRESSION_EDITOR_CONTRACT_VERSION} or the registry rejects it loudly.
|
|
144
|
+
*/
|
|
145
|
+
export interface ExpressionEditorContribution {
|
|
146
|
+
/** The language this editor authors; the lookup key a field resolves by. */
|
|
147
|
+
readonly language: ExpressionLanguage;
|
|
148
|
+
/** The {@link ExpressionEditorProps} contract this editor was built against. */
|
|
149
|
+
readonly contractVersion: number;
|
|
150
|
+
/** Best-effort warm of the editor's chunk on open-intent; never awaited by the field. */
|
|
151
|
+
readonly preload?: () => void;
|
|
152
|
+
/** Resolve the editor component's chunk; rejection surfaces as the field's loud error. */
|
|
153
|
+
readonly load: () => Promise<{
|
|
154
|
+
readonly Editor: ComponentType<ExpressionEditorProps>;
|
|
155
|
+
}>;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/expression/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;I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AW,CAAC,EAAE,6BAA6B,CAAC;IACrD,QAAQ,CAAC,cAAc,CAAC,EAAE,wBAAwB,CAAC;CACpD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,oFAAoF;IACpF,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,qDAAqD;IACrD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA4B;IAC3C,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,gFAAgF;IAChF,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,yFAAyF;IACzF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAA;KAAE,CAAC,CAAC;CACzF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contract version an {@link ExpressionEditorContribution} must target. Bumped
|
|
3
|
+
* only on a BREAKING change to {@link ExpressionEditorProps} or the contribution
|
|
4
|
+
* shape; the registry rejects a contribution whose `contractVersion` is not
|
|
5
|
+
* exactly this, so a host never mounts an editor built against an incompatible
|
|
6
|
+
* props contract. It is distinct from `STUDIO_PLUGIN_API_VERSION`: the plugin API
|
|
7
|
+
* gains this whole extension point ADDITIVELY (that version does not move), and
|
|
8
|
+
* this narrower number then versions the editor props independently.
|
|
9
|
+
*/
|
|
10
|
+
export const EXPRESSION_EDITOR_CONTRACT_VERSION = 1;
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/expression/types.ts"],"names":[],"mappings":"AAuIA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC"}
|
package/dist/hooks/useApi.d.ts
CHANGED
|
@@ -1000,6 +1000,14 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
1000
1000
|
created_at: string;
|
|
1001
1001
|
id: string;
|
|
1002
1002
|
recipient: string | null;
|
|
1003
|
+
options?: string[] | null | undefined;
|
|
1004
|
+
template?: {
|
|
1005
|
+
name: string;
|
|
1006
|
+
language: string;
|
|
1007
|
+
parameters: string[];
|
|
1008
|
+
} | null | undefined;
|
|
1009
|
+
audience?: string | null | undefined;
|
|
1010
|
+
media?: unknown[] | null | undefined;
|
|
1003
1011
|
}[];
|
|
1004
1012
|
}>;
|
|
1005
1013
|
readonly listAgents: (signal?: AbortSignal) => Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApi.d.ts","sourceRoot":"","sources":["../../src/hooks/useApi.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD,eAAO,MAAM,WAAW;;+BAW8jc,CAAC;iDAAsF,CAAC;;;;;uCAAuM,CAAC;;;;;4EAAgO,CAAC;wFAAgG,CAAC;;;+CAA2G,CAAC;;;;;aAAqL,CAAC;cAAoC,CAAC;mBAA8B,CAAC;;oDAAkF,CAAC;;;;;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U,CAAC;;;;;;;;;;;;;2BAAghB,CAAC;;;;;;;;;;;;;2BAAygB,CAAC;;;;wBAAwH,CAAC;;;;;;;mCAA+L,CAAC;;;;;;;;uCAA6wB,CAAC;;;;;;;;;;;6CAAgsB,CAAC,kDAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;8BAA0vB,CAAC,+CAAmB,CAAC;;;;;;;;;;wBAAoV,CAAC;yBAAoC,CAAC;;;;;kDAAyI,CAAC;;;;;;;;;;;;;;;;;iBAAyiB,CAAC;kBAA6B,CAAC;iBAA4B,CAAC;oBAA+B,CAAC;;aAAqC,CAAC;cAAyB,CAAC;gBAA2B,CAAC;;kDAAqE,CAAC;;;aAA8H,CAAC;sCAAuE,CAAC,4DAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAA6zB,CAAC;;;2EAA8H,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAAk5B,CAAC;;;;;;;;4BAA+T,CAAC;;;;;;;;;cAA8Q,CAAC;eAAgE,CAAC;gBAA8C,CAAC;;+CAAoF,CAAC;0CAA+E,CAAC;qDAA0F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;gHAA21B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAAg0F,CAAC;;;;;;;;;;;;+BAAkW,CAAC;oCAAuE,CAAC;;;;;;wCAAgoB,CAAC;SAXp6vE,CAAC;AAE/C,wBAAgB,MAAM,IAAI,SAAS,CAMlC;AAED,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ import './components/components.css';
|
|
|
21
21
|
export type { PluginContext, PluginEntry, ToolPanelProps, PluginPageProps, PluginPageParamsSchema, SettingsTabProps, ToolPanelContribution, PageContribution, RegisteredPage, SettingsTabContribution, RegisteredSettingsTab, NavEntryContribution, NavEntrySection, RegisteredNavEntry, PluginContributions, RequiredCapabilities, } from './plugin/types';
|
|
22
22
|
export { STUDIO_PLUGIN_API_VERSION, checkPluginApiVersion } from './plugin/version';
|
|
23
23
|
export type { VersionGateResult } from './plugin/version';
|
|
24
|
+
export { EXPRESSION_EDITOR_CONTRACT_VERSION } from './expression/types';
|
|
25
|
+
export type { ExpressionLanguage, ExpressionInputKey, ExpressionShapeDescriptor, ExpressionSampleInputProvider, ExpressionValidationResult, ExpressionServerValidate, ExpressionFieldDeclaration, ExpressionEditorProps, ExpressionEditorContribution, } from './expression/types';
|
|
26
|
+
export { ExpressionEditorsProvider, useExpressionEditor } from './expression/context';
|
|
27
|
+
export type { ExpressionEditorsProviderProps } from './expression/context';
|
|
28
|
+
export { ExpressionField, ExpressionEditorLauncher } from './expression/ExpressionField';
|
|
29
|
+
export type { ExpressionFieldProps, ExpressionEditorLauncherProps, ExpressionControlProps, } from './expression/ExpressionField';
|
|
24
30
|
export { ApiProvider, useApi } from './hooks/useApi';
|
|
25
31
|
export type { ApiClient } from './hooks/useApi';
|
|
26
32
|
export { UnauthorizedProvider, useOnUnauthorized } from './hooks/useUnauthorized';
|
|
@@ -98,6 +104,8 @@ export { EntityCardGrid } from './components/entity-card-grid';
|
|
|
98
104
|
export type { EntityCardGridProps } from './components/entity-card-grid';
|
|
99
105
|
export { ExplorerView, buildTagVocabulary, matchesSelectedTags, UNTAGGED_TOKEN, } from './components/explorer-view';
|
|
100
106
|
export type { ExplorerViewProps, ExplorerColumn, ExplorerTags, ExplorerSearch, ExplorerEmptyState, ExplorerEmptyStates, TagVocabularyEntry, } from './components/explorer-view';
|
|
107
|
+
export { openTargetProps } from './components/open-target';
|
|
108
|
+
export type { OpenTargetOptions, OpenTargetProps } from './components/open-target';
|
|
101
109
|
export { FolderBreadcrumb, FolderRow, FolderPicker, childFolders, folderPathTo, } from './components/folder-nav';
|
|
102
110
|
export type { Folder, FolderBreadcrumbProps, FolderRowProps, FolderPickerProps, } from './components/folder-nav';
|
|
103
111
|
export { CodeBlock } from './components/code-block';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,gB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AAC5B,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnE,OAAO,EACL,UAAU,EACV,0BAA0B,EAC1B,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,UAAU,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC/D,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAG/F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,YAAY,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,10 @@ import './components/tokens.css';
|
|
|
26
26
|
import './components/fonts.css';
|
|
27
27
|
import './components/components.css';
|
|
28
28
|
export { STUDIO_PLUGIN_API_VERSION, checkPluginApiVersion } from './plugin/version';
|
|
29
|
+
// -- Expression fields (declaration vocabulary + editor extension point) ------
|
|
30
|
+
export { EXPRESSION_EDITOR_CONTRACT_VERSION } from './expression/types';
|
|
31
|
+
export { ExpressionEditorsProvider, useExpressionEditor } from './expression/context';
|
|
32
|
+
export { ExpressionField, ExpressionEditorLauncher } from './expression/ExpressionField';
|
|
29
33
|
// -- Hooks -------------------------------------------------------------------
|
|
30
34
|
export { ApiProvider, useApi } from './hooks/useApi';
|
|
31
35
|
export { UnauthorizedProvider, useOnUnauthorized } from './hooks/useUnauthorized';
|
|
@@ -78,6 +82,9 @@ export { OverlayDetailsFields, overlayDetailsPatch } from './components/overlay-
|
|
|
78
82
|
export { ViewToggle, useViewMode } from './components/view-toggle';
|
|
79
83
|
export { EntityCardGrid } from './components/entity-card-grid';
|
|
80
84
|
export { ExplorerView, buildTagVocabulary, matchesSelectedTags, UNTAGGED_TOKEN, } from './components/explorer-view';
|
|
85
|
+
// The canonical whole-row/whole-card "open" affordance: one helper every
|
|
86
|
+
// navigable list surface spreads onto its entry (see the module doc).
|
|
87
|
+
export { openTargetProps } from './components/open-target';
|
|
81
88
|
export { FolderBreadcrumb, FolderRow, FolderPicker, childFolders, folderPathTo, } from './components/folder-nav';
|
|
82
89
|
export { CodeBlock } from './components/code-block';
|
|
83
90
|
export { Markdown, parseMarkdown } from './components/markdown';
|
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,+EAA+E;AAC/E,4EAA4E;AAC5E,iFAAiF;AACjF,iFAAiF;AACjF,+EAA+E;AAC/E,qEAAqE;AACrE,OAAO,yBAAyB,CAAC;AACjC,OAAO,wBAAwB,CAAC;AAChC,OAAO,6BAA6B,CAAC;AAqBrC,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGpF,+EAA+E;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAA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,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,UAAU,EACV,QAAQ,EACR,UAAU,EACV,aAAa,EACb,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,WAAW,EACX,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAG5B,+EAA+E;AAC/E,OAAO,EACL,UAAU,EACV,0BAA0B,EAC1B,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,GACX,MAAM,eAAe,CAAC;AAcvB,+EAA+E;AAC/E,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG/D,+EAA+E;AAC/E,OAAO,EAAE,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/plugin/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAIV,mBAAmB,EACnB,WAAW,EAMZ,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/plugin/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAIV,mBAAmB,EACnB,WAAW,EAMZ,MAAM,SAAS,CAAC;AAiBjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAwJpF;AAED,wEAAwE;AACxE,wBAAgB,gBAAgB,IAAI,mBAAmB,CAEtD;AAED,2DAA2D;AAC3D,wBAAgB,oBAAoB,IAAI,IAAI,CAM3C"}
|
package/dist/plugin/registry.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { EXPRESSION_EDITOR_CONTRACT_VERSION, } from '../expression/types';
|
|
1
2
|
const toolPanels = new Map();
|
|
2
3
|
const pages = [];
|
|
3
4
|
const settingsTabs = [];
|
|
4
5
|
const navEntries = [];
|
|
6
|
+
// `let`, never mutated in place: {@link ExpressionEditorsProvider} memoizes its
|
|
7
|
+
// context value on this map's IDENTITY, so committing an editor must turn the
|
|
8
|
+
// identity over — otherwise a field mounted on a core route (which never waits
|
|
9
|
+
// for the plugin load pass) would keep the stale empty map and never grow its
|
|
10
|
+
// launcher. The commit path below reassigns; nothing calls `.set` on it.
|
|
11
|
+
let expressionEditors = new Map();
|
|
5
12
|
/**
|
|
6
13
|
* Load one plugin: call its `register` entry with a context bound to `pluginId`,
|
|
7
14
|
* then commit everything it staged into the global registry.
|
|
@@ -28,6 +35,7 @@ export async function loadPlugin(pluginId, entry) {
|
|
|
28
35
|
const stagedSettingsTabs = [];
|
|
29
36
|
const stagedTabIds = new Set();
|
|
30
37
|
const stagedNavEntries = [];
|
|
38
|
+
const stagedExpressionEditors = new Map();
|
|
31
39
|
let sealed = false;
|
|
32
40
|
const context = {
|
|
33
41
|
registerPage(contribution) {
|
|
@@ -78,6 +86,30 @@ export async function loadPlugin(pluginId, entry) {
|
|
|
78
86
|
}
|
|
79
87
|
stagedNavEntries.push({ ...contribution, pluginId });
|
|
80
88
|
},
|
|
89
|
+
registerExpressionEditor(contribution) {
|
|
90
|
+
if (sealed) {
|
|
91
|
+
throw new Error('registration is closed: a plugin must register during register(), not after it resolves');
|
|
92
|
+
}
|
|
93
|
+
// Contract-version mismatch is a LOUD per-plugin registration error, never a
|
|
94
|
+
// silent skip: an editor built against a different props contract would mount
|
|
95
|
+
// with the wrong props, so it is rejected during register() and becomes this
|
|
96
|
+
// plugin's error card. Checked before the duplicate guard so a mismatched
|
|
97
|
+
// contribution never claims a language.
|
|
98
|
+
if (contribution.contractVersion !== EXPRESSION_EDITOR_CONTRACT_VERSION) {
|
|
99
|
+
throw new Error(`plugin “${pluginId}” registered an expression editor for “${contribution.language}” ` +
|
|
100
|
+
`targeting contract v${String(contribution.contractVersion)} but this host is ` +
|
|
101
|
+
`v${String(EXPRESSION_EDITOR_CONTRACT_VERSION)} — the editor must be rebuilt`);
|
|
102
|
+
}
|
|
103
|
+
// A language is a GLOBAL key: at most one editor across the deployment. A
|
|
104
|
+
// second contribution for a language already staged or committed (by this
|
|
105
|
+
// plugin or another) would leave one editor unreachable — fail loudly, as
|
|
106
|
+
// registerToolPanel does for a tool name.
|
|
107
|
+
if (stagedExpressionEditors.has(contribution.language) ||
|
|
108
|
+
expressionEditors.has(contribution.language)) {
|
|
109
|
+
throw new Error(`an expression editor is already registered for language ${contribution.language}`);
|
|
110
|
+
}
|
|
111
|
+
stagedExpressionEditors.set(contribution.language, contribution);
|
|
112
|
+
},
|
|
81
113
|
};
|
|
82
114
|
try {
|
|
83
115
|
await entry(context);
|
|
@@ -114,10 +146,15 @@ export async function loadPlugin(pluginId, entry) {
|
|
|
114
146
|
for (const navEntry of stagedNavEntries) {
|
|
115
147
|
navEntries.push(navEntry);
|
|
116
148
|
}
|
|
149
|
+
if (stagedExpressionEditors.size > 0) {
|
|
150
|
+
// Reassign (see the declaration): identity turnover is what re-notifies
|
|
151
|
+
// mounted ExpressionFields when the load pass commits an editor.
|
|
152
|
+
expressionEditors = new Map([...expressionEditors, ...stagedExpressionEditors]);
|
|
153
|
+
}
|
|
117
154
|
}
|
|
118
155
|
/** The shell reads this after loading every installed plugin bundle. */
|
|
119
156
|
export function getContributions() {
|
|
120
|
-
return { toolPanels, pages, settingsTabs, navEntries };
|
|
157
|
+
return { toolPanels, pages, settingsTabs, navEntries, expressionEditors };
|
|
121
158
|
}
|
|
122
159
|
/** Tests reset the module-level registry between cases. */
|
|
123
160
|
export function __resetContributions() {
|
|
@@ -125,5 +162,6 @@ export function __resetContributions() {
|
|
|
125
162
|
pages.length = 0;
|
|
126
163
|
settingsTabs.length = 0;
|
|
127
164
|
navEntries.length = 0;
|
|
165
|
+
expressionEditors = new Map();
|
|
128
166
|
}
|
|
129
167
|
//# sourceMappingURL=registry.js.map
|