@tai42/studio-sdk 9.3.0 → 10.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/README.md +45 -6
- package/SECURITY.md +10 -2
- package/dist/index.d.ts +16 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -9
- package/dist/index.js.map +1 -1
- package/dist/schema-form/SchemaForm.d.ts +4 -3
- package/dist/schema-form/SchemaForm.d.ts.map +1 -1
- package/dist/schema-form/SchemaForm.js.map +1 -1
- package/dist/schema-form/context.d.ts +2 -2
- package/dist/schema-form/index.d.ts +11 -11
- package/dist/schema-form/index.js +11 -11
- package/dist/schema-form/string-field.d.ts +3 -2
- package/dist/schema-form/string-field.d.ts.map +1 -1
- package/dist/schema-form/string-field.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +21 -30
- package/src/schema-form/SchemaForm.tsx +4 -3
- package/src/schema-form/context.ts +2 -2
- package/src/schema-form/index.ts +11 -11
- package/src/schema-form/string-field.tsx +3 -2
- package/dist/jq.d.ts +0 -31
- package/dist/jq.d.ts.map +0 -1
- package/dist/jq.js +0 -41
- package/dist/jq.js.map +0 -1
- package/src/jq.ts +0 -61
package/README.md
CHANGED
|
@@ -19,13 +19,14 @@ pnpm add @tai42/studio-sdk
|
|
|
19
19
|
|
|
20
20
|
## Entry points
|
|
21
21
|
|
|
22
|
-
- `@tai42/studio-sdk` — the plugin API, design system, and
|
|
22
|
+
- `@tai42/studio-sdk` — the plugin API, design system, hooks, and the
|
|
23
|
+
schema-driven `SchemaForm`. It exports **no jq**: the visual jq editor is the
|
|
24
|
+
separately published `@tai42/jq-studio`, which consumers import directly (see
|
|
25
|
+
[Expression fields](#expression-fields)).
|
|
23
26
|
- `@tai42/studio-sdk/host` — the host-only plugin registry.
|
|
24
|
-
- `@tai42/studio-sdk/schema-form` — a
|
|
25
|
-
consumers
|
|
26
|
-
|
|
27
|
-
explicitly. Expression fields render as plain inputs unless the host injects
|
|
28
|
-
a door (see `ExpressionFieldContext`).
|
|
27
|
+
- `@tai42/studio-sdk/schema-form` — a form-only `SchemaForm` entry for bundling
|
|
28
|
+
consumers that want the form without the barrel. It imports no CSS by design —
|
|
29
|
+
a subpath consumer loads `tokens.css` and `components.css` explicitly.
|
|
29
30
|
- `@tai42/studio-sdk/testing` — test-only helpers: a registry reset and
|
|
30
31
|
`installJsdomStubs()`, which fills the browser APIs jsdom omits.
|
|
31
32
|
- `@tai42/studio-sdk/tokens.css` — the design-token stylesheet. It also emits the
|
|
@@ -47,6 +48,44 @@ A host that bundles the SDK gets all three through the barrel's side-effect
|
|
|
47
48
|
imports. A host that consumes the SDK as an external module (the Studio shell
|
|
48
49
|
resolves it through the served import map) imports the three stylesheets itself.
|
|
49
50
|
|
|
51
|
+
## Expression fields
|
|
52
|
+
|
|
53
|
+
A string field carrying the `x-tai42-expression` annotation authors through a
|
|
54
|
+
visual expression editor — but **only when the host injects one**. The SDK owns
|
|
55
|
+
the injection point and nothing else:
|
|
56
|
+
|
|
57
|
+
- `ExpressionFieldContext` — the ambient door for a whole tree.
|
|
58
|
+
- `SchemaForm`'s `expressionField` prop — the per-form door.
|
|
59
|
+
- `ExpressionFieldComponent` / `ExpressionFieldProps` / `ExpressionInputShape` —
|
|
60
|
+
the door contract, which MIRRORS jq-studio's field props without importing
|
|
61
|
+
them.
|
|
62
|
+
|
|
63
|
+
With no door, an annotated field renders the plain string input, and the SDK's
|
|
64
|
+
module graph reaches no jq at all — no editor, no Web Worker, no wasm.
|
|
65
|
+
|
|
66
|
+
The door itself is `JqField` from
|
|
67
|
+
[`@tai42/jq-studio`](https://www.npmjs.com/package/@tai42/jq-studio), imported
|
|
68
|
+
directly by whoever wants it:
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import { SchemaForm } from '@tai42/studio-sdk';
|
|
72
|
+
import { JqField } from '@tai42/jq-studio';
|
|
73
|
+
|
|
74
|
+
<SchemaForm schema={schema} value={value} onChange={onChange} expressionField={JqField} />;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
A host that wants the editor everywhere mounts the door once at its root
|
|
78
|
+
(`ExpressionFieldContext.Provider`), injects its design system into the editor
|
|
79
|
+
once (`PrimitivesProvider` from `@tai42/jq-studio`), and installs the shared
|
|
80
|
+
evaluation worker once at boot (`installDefaultJqWorker()`).
|
|
81
|
+
|
|
82
|
+
**Singleton.** jq-studio holds a module-scoped React context and one shared
|
|
83
|
+
worker, so a deployment must resolve `@tai42/jq-studio` to ONE module. In the
|
|
84
|
+
Studio that is the served import map (`/vendor/jq-studio.js`), exactly as it
|
|
85
|
+
serves react and `@tai42/studio-sdk`; a second bundled copy would give a second
|
|
86
|
+
primitives context (the design-system injection silently falls back to the
|
|
87
|
+
built-ins), a second worker, and a duplicate multi-megabyte wasm.
|
|
88
|
+
|
|
50
89
|
## Browser support
|
|
51
90
|
|
|
52
91
|
The stylesheets ship as authored, with no build-time lowering, so the CSS they
|
package/SECURITY.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
`@tai42/studio-sdk` ships as three entry points, split along a trust boundary:
|
|
4
4
|
|
|
5
5
|
- **`@tai42/studio-sdk`** — the plugin surface. Types, `PluginContext`/`PluginEntry`,
|
|
6
|
-
contribution types, the design system, and hooks. This is the only entry a
|
|
7
|
-
Studio plugin is allowed to import, and it is the
|
|
6
|
+
contribution types, the design system, and hooks. This is the only SDK entry a
|
|
7
|
+
Studio plugin is allowed to import, and it is the served vendor asset
|
|
8
8
|
(`/vendor/studio-sdk.js`) every plugin bundle binds through the import map.
|
|
9
9
|
- **`@tai42/studio-sdk/host`** — the host-only registry API: `loadPlugin` (the one
|
|
10
10
|
entry a plugin's `register` contributes through) and `getContributions` (what the
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
- **`@tai42/studio-sdk/testing`** — a test-only registry reset (`__resetContributions`).
|
|
14
14
|
Never served to the browser.
|
|
15
15
|
|
|
16
|
+
The SDK is not the only shared module the import map serves to plugins. The other
|
|
17
|
+
is **`@tai42/jq-studio`** (`/vendor/jq-studio.js`), the standalone visual jq editor:
|
|
18
|
+
a separately published package, not an SDK entry point — the SDK re-exports none of
|
|
19
|
+
it — that a plugin rendering `JqField` imports directly. It sits on the plugin side
|
|
20
|
+
of the boundary: it carries no registry, and being served as one module is what
|
|
21
|
+
makes a plugin's editor share the host's single primitives context and evaluation
|
|
22
|
+
worker, exactly as the served react and `@tai42/studio-sdk` are shared.
|
|
23
|
+
|
|
16
24
|
## Why the split
|
|
17
25
|
|
|
18
26
|
The in-memory registry lives in one module and is a singleton across the plugin
|
package/dist/index.d.ts
CHANGED
|
@@ -11,9 +11,22 @@
|
|
|
11
11
|
* exported only from `@tai42/studio-sdk/host`, which the host bundle imports. See
|
|
12
12
|
* SECURITY.md for the trust boundary.
|
|
13
13
|
*
|
|
14
|
-
* The
|
|
15
|
-
* across the plugin boundary; this package imports nothing internal at
|
|
16
|
-
* (the `ApiClient`/`Interaction` types are type-only imports).
|
|
14
|
+
* The shared modules (react, react-dom, @tai42/studio-sdk, @tai42/jq-studio) are
|
|
15
|
+
* singletons across the plugin boundary; this package imports nothing internal at
|
|
16
|
+
* runtime (the `ApiClient`/`Interaction` types are type-only imports).
|
|
17
|
+
*
|
|
18
|
+
* NO JQ. The visual jq editor is `@tai42/jq-studio`, a separately published,
|
|
19
|
+
* client-agnostic package, and this barrel does not re-export it — not even as a
|
|
20
|
+
* thin pass-through. A bundler emits a package's Web Worker file and wasm engine
|
|
21
|
+
* from the mere PRESENCE of the module in the graph (the assets are emitted while
|
|
22
|
+
* the module is transformed, before tree-shaking can drop an unused re-export), so
|
|
23
|
+
* a pass-through here would put ~2.9MB of jq runtime into every consumer that
|
|
24
|
+
* imports this barrel for a Button. Consumers that want the editor import
|
|
25
|
+
* `@tai42/jq-studio` directly; the import map resolves that bare specifier to the
|
|
26
|
+
* one served copy, so the whole deployment still shares a single jq instance, a
|
|
27
|
+
* single primitives injection, and a single worker. What the SDK keeps is the
|
|
28
|
+
* INJECTION POINT — `ExpressionFieldContext` / `SchemaForm`'s `expressionField`
|
|
29
|
+
* prop, plus the mirrored contract types — which holds no edge to jq at all.
|
|
17
30
|
*/
|
|
18
31
|
import './components/tokens.css';
|
|
19
32
|
import './components/fonts.css';
|
|
@@ -21,8 +34,6 @@ import './components/components.css';
|
|
|
21
34
|
export type { PluginContext, PluginEntry, ToolPanelProps, PluginPageProps, PluginPageParamsSchema, SettingsTabProps, ToolPanelContribution, PageContribution, RegisteredPage, SettingsTabContribution, RegisteredSettingsTab, NavEntryContribution, NavEntrySection, RegisteredNavEntry, PluginContributions, RequiredCapabilities, } from './plugin/types';
|
|
22
35
|
export { STUDIO_PLUGIN_API_VERSION, checkPluginApiVersion } from './plugin/version';
|
|
23
36
|
export type { VersionGateResult } from './plugin/version';
|
|
24
|
-
export { JqField, JQEditorDialog, JqEditorDialog, preloadJq, installDefaultJqWorker, PrimitivesProvider, } from './jq';
|
|
25
|
-
export type { JqFieldProps, JQEditorDialogProps, JqEditorDialogProps, ExpressionLanguage, JqInputKey, JqInputShapeDescriptor, SampleInputProvider, ServerValidationResult, ServerValidateHook, JqFieldDeclaration, Primitives, } from './jq';
|
|
26
37
|
export { ApiProvider, useApi } from './hooks/useApi';
|
|
27
38
|
export type { ApiClient } from './hooks/useApi';
|
|
28
39
|
export { UnauthorizedProvider, useOnUnauthorized } from './hooks/useUnauthorized';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAQH,OAAO,yBAAyB,CAAC;AACjC,OAAO,wBAAwB,CAAC;AAChC,OAAO,6BAA6B,CAAC;AAGrC,YAAY,EACV,aAAa,EACb,WAAW,EACX,cAAc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AAiB,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
|
@@ -11,9 +11,22 @@
|
|
|
11
11
|
* exported only from `@tai42/studio-sdk/host`, which the host bundle imports. See
|
|
12
12
|
* SECURITY.md for the trust boundary.
|
|
13
13
|
*
|
|
14
|
-
* The
|
|
15
|
-
* across the plugin boundary; this package imports nothing internal at
|
|
16
|
-
* (the `ApiClient`/`Interaction` types are type-only imports).
|
|
14
|
+
* The shared modules (react, react-dom, @tai42/studio-sdk, @tai42/jq-studio) are
|
|
15
|
+
* singletons across the plugin boundary; this package imports nothing internal at
|
|
16
|
+
* runtime (the `ApiClient`/`Interaction` types are type-only imports).
|
|
17
|
+
*
|
|
18
|
+
* NO JQ. The visual jq editor is `@tai42/jq-studio`, a separately published,
|
|
19
|
+
* client-agnostic package, and this barrel does not re-export it — not even as a
|
|
20
|
+
* thin pass-through. A bundler emits a package's Web Worker file and wasm engine
|
|
21
|
+
* from the mere PRESENCE of the module in the graph (the assets are emitted while
|
|
22
|
+
* the module is transformed, before tree-shaking can drop an unused re-export), so
|
|
23
|
+
* a pass-through here would put ~2.9MB of jq runtime into every consumer that
|
|
24
|
+
* imports this barrel for a Button. Consumers that want the editor import
|
|
25
|
+
* `@tai42/jq-studio` directly; the import map resolves that bare specifier to the
|
|
26
|
+
* one served copy, so the whole deployment still shares a single jq instance, a
|
|
27
|
+
* single primitives injection, and a single worker. What the SDK keeps is the
|
|
28
|
+
* INJECTION POINT — `ExpressionFieldContext` / `SchemaForm`'s `expressionField`
|
|
29
|
+
* prop, plus the mirrored contract types — which holds no edge to jq at all.
|
|
17
30
|
*/
|
|
18
31
|
// The design system, delivered by the BARREL so each host app loads it once and a
|
|
19
32
|
// plugin never ships its own copy. These are bare side-effect imports, so they
|
|
@@ -26,8 +39,6 @@ import './components/tokens.css';
|
|
|
26
39
|
import './components/fonts.css';
|
|
27
40
|
import './components/components.css';
|
|
28
41
|
export { STUDIO_PLUGIN_API_VERSION, checkPluginApiVersion } from './plugin/version';
|
|
29
|
-
// -- jq fields (re-exported from @tai42/jq-studio; the platform owns no jq code) --
|
|
30
|
-
export { JqField, JQEditorDialog, JqEditorDialog, preloadJq, installDefaultJqWorker, PrimitivesProvider, } from './jq';
|
|
31
42
|
// -- Hooks -------------------------------------------------------------------
|
|
32
43
|
export { ApiProvider, useApi } from './hooks/useApi';
|
|
33
44
|
export { UnauthorizedProvider, useOnUnauthorized } from './hooks/useUnauthorized';
|
|
@@ -105,10 +116,11 @@ export { NAV_ICONS, DashboardIcon, ToolsIcon, AgentsIcon, PresetsIcon, Extension
|
|
|
105
116
|
// -- Schema-driven forms -----------------------------------------------------
|
|
106
117
|
export { SchemaForm, RecordEntryRendererContext,
|
|
107
118
|
// The expression-door injection point: a host that wants `x-tai42-expression`
|
|
108
|
-
// fields to author through the visual editor
|
|
109
|
-
// `
|
|
110
|
-
//
|
|
111
|
-
//
|
|
119
|
+
// fields to author through the visual editor imports `JqField` from
|
|
120
|
+
// `@tai42/jq-studio` and hands it to a form (the `expressionField` prop) or
|
|
121
|
+
// mounts this context above its tree. A form with no door renders those fields
|
|
122
|
+
// as plain string inputs and stays free of the jq subgraph — the editor, its
|
|
123
|
+
// worker, and its wasm — entirely.
|
|
112
124
|
ExpressionFieldContext, SecretRefField, defaultValueForSchema, validateAgainstSchema, resolveRef, } from './schema-form';
|
|
113
125
|
// -- Schema-editor (validated JSON-Schema authoring control) -----------------
|
|
114
126
|
export { SchemaEditor, lintSchemaText } from './schema-editor';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;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,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,WAAW,GACZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,a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ACd,SAAS,EACT,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,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;AAC1B,8EAA8E;AAC9E,oEAAoE;AACpE,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,mCAAmC;AACnC,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,GACX,MAAM,eAAe,CAAC;AAkBvB,+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"}
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
* checks live in the sibling `media` module.
|
|
35
35
|
*
|
|
36
36
|
* EXPRESSION FIELDS ARE OPT-IN. A string field carrying `x-tai42-expression`
|
|
37
|
-
* renders an expression-authoring door —
|
|
37
|
+
* renders an expression-authoring door — `JqField` from `@tai42/jq-studio` — only
|
|
38
|
+
* when the host
|
|
38
39
|
* INJECTS one, through {@link SchemaFormProps.expressionField} or the ambient
|
|
39
40
|
* {@link ExpressionFieldContext}; with no door it renders the plain string input.
|
|
40
41
|
* The form owns no edge to the door: importing it here, even dynamically behind
|
|
@@ -74,8 +75,8 @@ export interface SchemaFormProps {
|
|
|
74
75
|
readonly maxUploadBytes?: number;
|
|
75
76
|
/**
|
|
76
77
|
* Optional. The expression-authoring door for `x-tai42-expression` fields —
|
|
77
|
-
*
|
|
78
|
-
* the module doc-comment). Omitted, the enclosing
|
|
78
|
+
* `JqField` from `@tai42/jq-studio`, which the host imports directly and passes
|
|
79
|
+
* here (see the module doc-comment). Omitted, the enclosing
|
|
79
80
|
* {@link ExpressionFieldContext} supplies it; absent both, an annotated field
|
|
80
81
|
* renders the plain string input.
|
|
81
82
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaForm.d.ts","sourceRoot":"","sources":["../../src/schema-form/SchemaForm.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SchemaForm.d.ts","sourceRoot":"","sources":["../../src/schema-form/SchemaForm.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAS1D,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;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACjD;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC;;;;;;OAMG;IACH,QAAQ,CAAC,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaForm.js","sourceRoot":"","sources":["../../src/schema-form/SchemaForm.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SchemaForm.js","sourceRoot":"","sources":["../../src/schema-form/SchemaForm.tsx"],"names":[],"mappings":";AA+CA,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"}
|
|
@@ -74,8 +74,8 @@ export interface ExpressionFieldProps {
|
|
|
74
74
|
readonly multiline?: boolean;
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
* The expression-authoring door a host INJECTS into the form — `JqField`,
|
|
78
|
-
*
|
|
77
|
+
* The expression-authoring door a host INJECTS into the form — `JqField`, which the
|
|
78
|
+
* host imports straight from `@tai42/jq-studio`.
|
|
79
79
|
*
|
|
80
80
|
* It is a COMPONENT, rendered as an element, never called as a function: the door
|
|
81
81
|
* owns hooks and state (editor open, worker handle), which only survive as its own
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
* component plus the value/validation helpers a caller needs to seed, validate,
|
|
5
5
|
* and submit.
|
|
6
6
|
*
|
|
7
|
-
* THE
|
|
8
|
-
* `@tai42/studio-sdk/schema-form
|
|
9
|
-
* standalone widget rather than a host serving the SDK as a shared module —
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* `SchemaForm`'s `expressionField`),
|
|
17
|
-
* jq bytes.
|
|
7
|
+
* THE FORM-ONLY ENTRY POINT. This module is published as
|
|
8
|
+
* `@tai42/studio-sdk/schema-form` for a consumer that BUNDLES the SDK — a
|
|
9
|
+
* standalone widget rather than a host serving the SDK as a shared module — and
|
|
10
|
+
* wants the form without the barrel: no CSS side effects, and no module graph
|
|
11
|
+
* beyond what the form itself renders.
|
|
12
|
+
*
|
|
13
|
+
* It is also jq-free, and so is the barrel: the visual editor lives in the
|
|
14
|
+
* separately published `@tai42/jq-studio`, which nothing under the SDK imports at
|
|
15
|
+
* runtime. Expression authoring reaches a form only by INJECTION (see
|
|
16
|
+
* `SchemaForm`'s `expressionField` and `ExpressionFieldContext`), so a consumer
|
|
17
|
+
* that never injects a door ships zero jq bytes through either entry point.
|
|
18
18
|
*
|
|
19
19
|
* The design system reaches this entry point through relative imports, so the
|
|
20
20
|
* form renders complete; only the barrel's three CSS side-effect imports stay
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
* component plus the value/validation helpers a caller needs to seed, validate,
|
|
5
5
|
* and submit.
|
|
6
6
|
*
|
|
7
|
-
* THE
|
|
8
|
-
* `@tai42/studio-sdk/schema-form
|
|
9
|
-
* standalone widget rather than a host serving the SDK as a shared module —
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* `SchemaForm`'s `expressionField`),
|
|
17
|
-
* jq bytes.
|
|
7
|
+
* THE FORM-ONLY ENTRY POINT. This module is published as
|
|
8
|
+
* `@tai42/studio-sdk/schema-form` for a consumer that BUNDLES the SDK — a
|
|
9
|
+
* standalone widget rather than a host serving the SDK as a shared module — and
|
|
10
|
+
* wants the form without the barrel: no CSS side effects, and no module graph
|
|
11
|
+
* beyond what the form itself renders.
|
|
12
|
+
*
|
|
13
|
+
* It is also jq-free, and so is the barrel: the visual editor lives in the
|
|
14
|
+
* separately published `@tai42/jq-studio`, which nothing under the SDK imports at
|
|
15
|
+
* runtime. Expression authoring reaches a form only by INJECTION (see
|
|
16
|
+
* `SchemaForm`'s `expressionField` and `ExpressionFieldContext`), so a consumer
|
|
17
|
+
* that never injects a door ships zero jq bytes through either entry point.
|
|
18
18
|
*
|
|
19
19
|
* The design system reaches this entry point through relative imports, so the
|
|
20
20
|
* form renders complete; only the barrel's three CSS side-effect imports stay
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* control instead; and when the form supplies a completion provider, the input is
|
|
7
7
|
* backed by argument autocomplete.
|
|
8
8
|
*
|
|
9
|
-
* NO JQ EDGE. This module — and every module under `schema-form
|
|
10
|
-
*
|
|
9
|
+
* NO JQ EDGE. This module — and every module under `schema-form`, and the package
|
|
10
|
+
* barrel above them — names no jq type and imports `@tai42/jq-studio` neither
|
|
11
|
+
* statically NOR dynamically.
|
|
11
12
|
* The jq authoring door drags a heavy subgraph (the xyflow visual editor, a Web
|
|
12
13
|
* Worker entry, and a multi-megabyte wasm engine), and a bundler EMITS that whole
|
|
13
14
|
* subgraph for a dynamic import just as it does for a static one — `lazy` defers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-field.d.ts","sourceRoot":"","sources":["../../src/schema-form/string-field.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"string-field.d.ts","sourceRoot":"","sources":["../../src/schema-form/string-field.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-field.js","sourceRoot":"","sources":["../../src/schema-form/string-field.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"string-field.js","sourceRoot":"","sources":["../../src/schema-form/string-field.tsx"],"names":[],"mappings":";AAqBA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7E,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,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,UAAU,WAAW,CAAC,EAC1B,OAAO,EACP,WAAW,EACX,KAAK,EACL,MAAM,EACN,KAAK,EACL,UAAU,EACV,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,GAYT;IACC,MAAM,kBA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ACd,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": "
|
|
3
|
+
"version": "10.0.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>",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@microsoft/api-extractor": "7.58.12",
|
|
76
|
+
"@tai42/jq-studio": "^0.1.3",
|
|
76
77
|
"@testing-library/jest-dom": "^6.9.1",
|
|
77
78
|
"@testing-library/react": "^16.3.2",
|
|
78
79
|
"@testing-library/user-event": "^14.6.6",
|
|
@@ -94,8 +95,7 @@
|
|
|
94
95
|
"@radix-ui/react-select": "^2.3.2",
|
|
95
96
|
"@radix-ui/react-tabs": "^1.1.16",
|
|
96
97
|
"@radix-ui/react-tooltip": "^1.2.11",
|
|
97
|
-
"@tai42/
|
|
98
|
-
"@tai42/api-client": "9.3.0"
|
|
98
|
+
"@tai42/api-client": "10.0.0"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
|
101
101
|
"build": "tsc -b tsconfig.build.json && node scripts/copy-assets.mjs",
|
package/src/index.ts
CHANGED
|
@@ -11,9 +11,22 @@
|
|
|
11
11
|
* exported only from `@tai42/studio-sdk/host`, which the host bundle imports. See
|
|
12
12
|
* SECURITY.md for the trust boundary.
|
|
13
13
|
*
|
|
14
|
-
* The
|
|
15
|
-
* across the plugin boundary; this package imports nothing internal at
|
|
16
|
-
* (the `ApiClient`/`Interaction` types are type-only imports).
|
|
14
|
+
* The shared modules (react, react-dom, @tai42/studio-sdk, @tai42/jq-studio) are
|
|
15
|
+
* singletons across the plugin boundary; this package imports nothing internal at
|
|
16
|
+
* runtime (the `ApiClient`/`Interaction` types are type-only imports).
|
|
17
|
+
*
|
|
18
|
+
* NO JQ. The visual jq editor is `@tai42/jq-studio`, a separately published,
|
|
19
|
+
* client-agnostic package, and this barrel does not re-export it — not even as a
|
|
20
|
+
* thin pass-through. A bundler emits a package's Web Worker file and wasm engine
|
|
21
|
+
* from the mere PRESENCE of the module in the graph (the assets are emitted while
|
|
22
|
+
* the module is transformed, before tree-shaking can drop an unused re-export), so
|
|
23
|
+
* a pass-through here would put ~2.9MB of jq runtime into every consumer that
|
|
24
|
+
* imports this barrel for a Button. Consumers that want the editor import
|
|
25
|
+
* `@tai42/jq-studio` directly; the import map resolves that bare specifier to the
|
|
26
|
+
* one served copy, so the whole deployment still shares a single jq instance, a
|
|
27
|
+
* single primitives injection, and a single worker. What the SDK keeps is the
|
|
28
|
+
* INJECTION POINT — `ExpressionFieldContext` / `SchemaForm`'s `expressionField`
|
|
29
|
+
* prop, plus the mirrored contract types — which holds no edge to jq at all.
|
|
17
30
|
*/
|
|
18
31
|
// The design system, delivered by the BARREL so each host app loads it once and a
|
|
19
32
|
// plugin never ships its own copy. These are bare side-effect imports, so they
|
|
@@ -48,29 +61,6 @@ export type {
|
|
|
48
61
|
export { STUDIO_PLUGIN_API_VERSION, checkPluginApiVersion } from './plugin/version';
|
|
49
62
|
export type { VersionGateResult } from './plugin/version';
|
|
50
63
|
|
|
51
|
-
// -- jq fields (re-exported from @tai42/jq-studio; the platform owns no jq code) --
|
|
52
|
-
export {
|
|
53
|
-
JqField,
|
|
54
|
-
JQEditorDialog,
|
|
55
|
-
JqEditorDialog,
|
|
56
|
-
preloadJq,
|
|
57
|
-
installDefaultJqWorker,
|
|
58
|
-
PrimitivesProvider,
|
|
59
|
-
} from './jq';
|
|
60
|
-
export type {
|
|
61
|
-
JqFieldProps,
|
|
62
|
-
JQEditorDialogProps,
|
|
63
|
-
JqEditorDialogProps,
|
|
64
|
-
ExpressionLanguage,
|
|
65
|
-
JqInputKey,
|
|
66
|
-
JqInputShapeDescriptor,
|
|
67
|
-
SampleInputProvider,
|
|
68
|
-
ServerValidationResult,
|
|
69
|
-
ServerValidateHook,
|
|
70
|
-
JqFieldDeclaration,
|
|
71
|
-
Primitives,
|
|
72
|
-
} from './jq';
|
|
73
|
-
|
|
74
64
|
// -- Hooks -------------------------------------------------------------------
|
|
75
65
|
export { ApiProvider, useApi } from './hooks/useApi';
|
|
76
66
|
export type { ApiClient } from './hooks/useApi';
|
|
@@ -373,10 +363,11 @@ export {
|
|
|
373
363
|
SchemaForm,
|
|
374
364
|
RecordEntryRendererContext,
|
|
375
365
|
// The expression-door injection point: a host that wants `x-tai42-expression`
|
|
376
|
-
// fields to author through the visual editor
|
|
377
|
-
// `
|
|
378
|
-
//
|
|
379
|
-
//
|
|
366
|
+
// fields to author through the visual editor imports `JqField` from
|
|
367
|
+
// `@tai42/jq-studio` and hands it to a form (the `expressionField` prop) or
|
|
368
|
+
// mounts this context above its tree. A form with no door renders those fields
|
|
369
|
+
// as plain string inputs and stays free of the jq subgraph — the editor, its
|
|
370
|
+
// worker, and its wasm — entirely.
|
|
380
371
|
ExpressionFieldContext,
|
|
381
372
|
SecretRefField,
|
|
382
373
|
defaultValueForSchema,
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
* checks live in the sibling `media` module.
|
|
35
35
|
*
|
|
36
36
|
* EXPRESSION FIELDS ARE OPT-IN. A string field carrying `x-tai42-expression`
|
|
37
|
-
* renders an expression-authoring door —
|
|
37
|
+
* renders an expression-authoring door — `JqField` from `@tai42/jq-studio` — only
|
|
38
|
+
* when the host
|
|
38
39
|
* INJECTS one, through {@link SchemaFormProps.expressionField} or the ambient
|
|
39
40
|
* {@link ExpressionFieldContext}; with no door it renders the plain string input.
|
|
40
41
|
* The form owns no edge to the door: importing it here, even dynamically behind
|
|
@@ -88,8 +89,8 @@ export interface SchemaFormProps {
|
|
|
88
89
|
readonly maxUploadBytes?: number;
|
|
89
90
|
/**
|
|
90
91
|
* Optional. The expression-authoring door for `x-tai42-expression` fields —
|
|
91
|
-
*
|
|
92
|
-
* the module doc-comment). Omitted, the enclosing
|
|
92
|
+
* `JqField` from `@tai42/jq-studio`, which the host imports directly and passes
|
|
93
|
+
* here (see the module doc-comment). Omitted, the enclosing
|
|
93
94
|
* {@link ExpressionFieldContext} supplies it; absent both, an annotated field
|
|
94
95
|
* renders the plain string input.
|
|
95
96
|
*/
|
|
@@ -98,8 +98,8 @@ export interface ExpressionFieldProps {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* The expression-authoring door a host INJECTS into the form — `JqField`,
|
|
102
|
-
*
|
|
101
|
+
* The expression-authoring door a host INJECTS into the form — `JqField`, which the
|
|
102
|
+
* host imports straight from `@tai42/jq-studio`.
|
|
103
103
|
*
|
|
104
104
|
* It is a COMPONENT, rendered as an element, never called as a function: the door
|
|
105
105
|
* owns hooks and state (editor open, worker handle), which only survive as its own
|
package/src/schema-form/index.ts
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
* component plus the value/validation helpers a caller needs to seed, validate,
|
|
5
5
|
* and submit.
|
|
6
6
|
*
|
|
7
|
-
* THE
|
|
8
|
-
* `@tai42/studio-sdk/schema-form
|
|
9
|
-
* standalone widget rather than a host serving the SDK as a shared module —
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* `SchemaForm`'s `expressionField`),
|
|
17
|
-
* jq bytes.
|
|
7
|
+
* THE FORM-ONLY ENTRY POINT. This module is published as
|
|
8
|
+
* `@tai42/studio-sdk/schema-form` for a consumer that BUNDLES the SDK — a
|
|
9
|
+
* standalone widget rather than a host serving the SDK as a shared module — and
|
|
10
|
+
* wants the form without the barrel: no CSS side effects, and no module graph
|
|
11
|
+
* beyond what the form itself renders.
|
|
12
|
+
*
|
|
13
|
+
* It is also jq-free, and so is the barrel: the visual editor lives in the
|
|
14
|
+
* separately published `@tai42/jq-studio`, which nothing under the SDK imports at
|
|
15
|
+
* runtime. Expression authoring reaches a form only by INJECTION (see
|
|
16
|
+
* `SchemaForm`'s `expressionField` and `ExpressionFieldContext`), so a consumer
|
|
17
|
+
* that never injects a door ships zero jq bytes through either entry point.
|
|
18
18
|
*
|
|
19
19
|
* The design system reaches this entry point through relative imports, so the
|
|
20
20
|
* form renders complete; only the barrel's three CSS side-effect imports stay
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* control instead; and when the form supplies a completion provider, the input is
|
|
7
7
|
* backed by argument autocomplete.
|
|
8
8
|
*
|
|
9
|
-
* NO JQ EDGE. This module — and every module under `schema-form
|
|
10
|
-
*
|
|
9
|
+
* NO JQ EDGE. This module — and every module under `schema-form`, and the package
|
|
10
|
+
* barrel above them — names no jq type and imports `@tai42/jq-studio` neither
|
|
11
|
+
* statically NOR dynamically.
|
|
11
12
|
* The jq authoring door drags a heavy subgraph (the xyflow visual editor, a Web
|
|
12
13
|
* Worker entry, and a multi-megabyte wasm engine), and a bundler EMITS that whole
|
|
13
14
|
* subgraph for a dynamic import just as it does for a static one — `lazy` defers
|
package/dist/jq.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The SDK's jq surface — a THIN re-export of `@tai42/jq-studio`, the standalone,
|
|
3
|
-
* embeddable visual jq editor. There is no tai42-owned jq component: the platform
|
|
4
|
-
* owns zero jq code. This module exists only so a feature package (which depends
|
|
5
|
-
* on `@tai42/studio-sdk` alone, never on `@tai42/jq-studio` directly) can reach
|
|
6
|
-
* the drop-in `JqField`, the lower-level `JqEditorDialog`, the agnostic
|
|
7
|
-
* field-declaration contract, and the runtime loader/worker helpers.
|
|
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
|
-
*
|
|
17
|
-
* BUNDLE + WORKER SHARING. A plugin bundle externalises `@tai42/studio-sdk`, so
|
|
18
|
-
* the SDK — and the one copy of `@tai42/jq-studio` it carries — ships once for the
|
|
19
|
-
* whole deployment. A plugin that renders `JqField` shares the host's single jq
|
|
20
|
-
* runtime, its single primitives injection (see the host's `PrimitivesProvider`
|
|
21
|
-
* wiring), and the single worker the host installs at boot
|
|
22
|
-
* ({@link installDefaultJqWorker}); it never bundles its own.
|
|
23
|
-
*
|
|
24
|
-
* The host app injects the SDK's design-system primitives into jq-studio ONCE at
|
|
25
|
-
* the root through jq-studio's `PrimitivesProvider` and installs the shared worker
|
|
26
|
-
* there, so every `JqField` — host feature or plugin — paints in the SDK design
|
|
27
|
-
* system and evaluates off the main thread with no per-site wiring.
|
|
28
|
-
*/
|
|
29
|
-
export { JqField, JQEditorDialog, JqEditorDialog, preloadJq, installDefaultJqWorker, PrimitivesProvider, } from '@tai42/jq-studio';
|
|
30
|
-
export type { JqFieldProps, JQEditorDialogProps, JqEditorDialogProps, ExpressionLanguage, JqInputKey, JqInputShapeDescriptor, SampleInputProvider, ServerValidationResult, ServerValidateHook, JqFieldDeclaration, Primitives, } from '@tai42/jq-studio';
|
|
31
|
-
//# sourceMappingURL=jq.d.ts.map
|
package/dist/jq.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The SDK's jq surface — a THIN re-export of `@tai42/jq-studio`, the standalone,
|
|
3
|
-
* embeddable visual jq editor. There is no tai42-owned jq component: the platform
|
|
4
|
-
* owns zero jq code. This module exists only so a feature package (which depends
|
|
5
|
-
* on `@tai42/studio-sdk` alone, never on `@tai42/jq-studio` directly) can reach
|
|
6
|
-
* the drop-in `JqField`, the lower-level `JqEditorDialog`, the agnostic
|
|
7
|
-
* field-declaration contract, and the runtime loader/worker helpers.
|
|
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
|
-
*
|
|
17
|
-
* BUNDLE + WORKER SHARING. A plugin bundle externalises `@tai42/studio-sdk`, so
|
|
18
|
-
* the SDK — and the one copy of `@tai42/jq-studio` it carries — ships once for the
|
|
19
|
-
* whole deployment. A plugin that renders `JqField` shares the host's single jq
|
|
20
|
-
* runtime, its single primitives injection (see the host's `PrimitivesProvider`
|
|
21
|
-
* wiring), and the single worker the host installs at boot
|
|
22
|
-
* ({@link installDefaultJqWorker}); it never bundles its own.
|
|
23
|
-
*
|
|
24
|
-
* The host app injects the SDK's design-system primitives into jq-studio ONCE at
|
|
25
|
-
* the root through jq-studio's `PrimitivesProvider` and installs the shared worker
|
|
26
|
-
* there, so every `JqField` — host feature or plugin — paints in the SDK design
|
|
27
|
-
* system and evaluates off the main thread with no per-site wiring.
|
|
28
|
-
*/
|
|
29
|
-
export { JqField, JQEditorDialog, JqEditorDialog, preloadJq, installDefaultJqWorker,
|
|
30
|
-
// The design-system injection point. jq-studio renders its editor chrome
|
|
31
|
-
// through primitives it reads from a module-scoped React context; the host
|
|
32
|
-
// mounts `PrimitivesProvider` ONCE at the root to substitute the SDK design
|
|
33
|
-
// system. It is re-exported HERE — off the same `@tai42/jq-studio` instance
|
|
34
|
-
// `JqField` comes from — so the host reaches it through the ONE shared SDK the
|
|
35
|
-
// import map serves, and the provider's context is the SAME object `JqField`
|
|
36
|
-
// reads. A host that imported `PrimitivesProvider` from `@tai42/jq-studio`
|
|
37
|
-
// directly would bundle a SECOND jq-studio copy: its `createContext` would be a
|
|
38
|
-
// different object, the injection would silently fall back to the built-ins,
|
|
39
|
-
// and the shell would ship a duplicate (orphan) jq worker + wasm.
|
|
40
|
-
PrimitivesProvider, } from '@tai42/jq-studio';
|
|
41
|
-
//# sourceMappingURL=jq.js.map
|
package/dist/jq.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/src/jq.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The SDK's jq surface — a THIN re-export of `@tai42/jq-studio`, the standalone,
|
|
3
|
-
* embeddable visual jq editor. There is no tai42-owned jq component: the platform
|
|
4
|
-
* owns zero jq code. This module exists only so a feature package (which depends
|
|
5
|
-
* on `@tai42/studio-sdk` alone, never on `@tai42/jq-studio` directly) can reach
|
|
6
|
-
* the drop-in `JqField`, the lower-level `JqEditorDialog`, the agnostic
|
|
7
|
-
* field-declaration contract, and the runtime loader/worker helpers.
|
|
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
|
-
*
|
|
17
|
-
* BUNDLE + WORKER SHARING. A plugin bundle externalises `@tai42/studio-sdk`, so
|
|
18
|
-
* the SDK — and the one copy of `@tai42/jq-studio` it carries — ships once for the
|
|
19
|
-
* whole deployment. A plugin that renders `JqField` shares the host's single jq
|
|
20
|
-
* runtime, its single primitives injection (see the host's `PrimitivesProvider`
|
|
21
|
-
* wiring), and the single worker the host installs at boot
|
|
22
|
-
* ({@link installDefaultJqWorker}); it never bundles its own.
|
|
23
|
-
*
|
|
24
|
-
* The host app injects the SDK's design-system primitives into jq-studio ONCE at
|
|
25
|
-
* the root through jq-studio's `PrimitivesProvider` and installs the shared worker
|
|
26
|
-
* there, so every `JqField` — host feature or plugin — paints in the SDK design
|
|
27
|
-
* system and evaluates off the main thread with no per-site wiring.
|
|
28
|
-
*/
|
|
29
|
-
export {
|
|
30
|
-
JqField,
|
|
31
|
-
JQEditorDialog,
|
|
32
|
-
JqEditorDialog,
|
|
33
|
-
preloadJq,
|
|
34
|
-
installDefaultJqWorker,
|
|
35
|
-
// The design-system injection point. jq-studio renders its editor chrome
|
|
36
|
-
// through primitives it reads from a module-scoped React context; the host
|
|
37
|
-
// mounts `PrimitivesProvider` ONCE at the root to substitute the SDK design
|
|
38
|
-
// system. It is re-exported HERE — off the same `@tai42/jq-studio` instance
|
|
39
|
-
// `JqField` comes from — so the host reaches it through the ONE shared SDK the
|
|
40
|
-
// import map serves, and the provider's context is the SAME object `JqField`
|
|
41
|
-
// reads. A host that imported `PrimitivesProvider` from `@tai42/jq-studio`
|
|
42
|
-
// directly would bundle a SECOND jq-studio copy: its `createContext` would be a
|
|
43
|
-
// different object, the injection would silently fall back to the built-ins,
|
|
44
|
-
// and the shell would ship a duplicate (orphan) jq worker + wasm.
|
|
45
|
-
PrimitivesProvider,
|
|
46
|
-
} from '@tai42/jq-studio';
|
|
47
|
-
export type {
|
|
48
|
-
JqFieldProps,
|
|
49
|
-
JQEditorDialogProps,
|
|
50
|
-
JqEditorDialogProps,
|
|
51
|
-
ExpressionLanguage,
|
|
52
|
-
JqInputKey,
|
|
53
|
-
JqInputShapeDescriptor,
|
|
54
|
-
SampleInputProvider,
|
|
55
|
-
ServerValidationResult,
|
|
56
|
-
ServerValidateHook,
|
|
57
|
-
JqFieldDeclaration,
|
|
58
|
-
// The nine-primitive contract a host builds its injection map against (see
|
|
59
|
-
// `PrimitivesProvider`).
|
|
60
|
-
Primitives,
|
|
61
|
-
} from '@tai42/jq-studio';
|