@tai42/studio-sdk 9.3.0 → 11.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.
Files changed (92) hide show
  1. package/README.md +45 -6
  2. package/SECURITY.md +10 -2
  3. package/dist/components/components.css +18 -0
  4. package/dist/components/dirty-guard.d.ts +23 -10
  5. package/dist/components/dirty-guard.d.ts.map +1 -1
  6. package/dist/components/dirty-guard.js +22 -12
  7. package/dist/components/dirty-guard.js.map +1 -1
  8. package/dist/components/field.d.ts.map +1 -1
  9. package/dist/components/field.js +1 -1
  10. package/dist/components/field.js.map +1 -1
  11. package/dist/components/fleet-report.d.ts +12 -3
  12. package/dist/components/fleet-report.d.ts.map +1 -1
  13. package/dist/components/fleet-report.js +28 -9
  14. package/dist/components/fleet-report.js.map +1 -1
  15. package/dist/components/icons.d.ts +4 -0
  16. package/dist/components/icons.d.ts.map +1 -1
  17. package/dist/components/icons.js +5 -0
  18. package/dist/components/icons.js.map +1 -1
  19. package/dist/hooks/useApi.d.ts +348 -2
  20. package/dist/hooks/useApi.d.ts.map +1 -1
  21. package/dist/host.d.ts +1 -1
  22. package/dist/host.d.ts.map +1 -1
  23. package/dist/index.d.ts +18 -7
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +23 -11
  26. package/dist/index.js.map +1 -1
  27. package/dist/navigation/context.d.ts +6 -2
  28. package/dist/navigation/context.d.ts.map +1 -1
  29. package/dist/navigation/context.js +10 -2
  30. package/dist/navigation/context.js.map +1 -1
  31. package/dist/navigation/types.d.ts +1 -0
  32. package/dist/navigation/types.d.ts.map +1 -1
  33. package/dist/plugin/host-state.d.ts +16 -0
  34. package/dist/plugin/host-state.d.ts.map +1 -1
  35. package/dist/plugin/host-state.js +1 -0
  36. package/dist/plugin/host-state.js.map +1 -1
  37. package/dist/plugin/types.d.ts +17 -7
  38. package/dist/plugin/types.d.ts.map +1 -1
  39. package/dist/schema-form/SchemaForm.d.ts +4 -3
  40. package/dist/schema-form/SchemaForm.d.ts.map +1 -1
  41. package/dist/schema-form/SchemaForm.js.map +1 -1
  42. package/dist/schema-form/SecretRefField.d.ts.map +1 -1
  43. package/dist/schema-form/SecretRefField.js +3 -2
  44. package/dist/schema-form/SecretRefField.js.map +1 -1
  45. package/dist/schema-form/context.d.ts +2 -2
  46. package/dist/schema-form/default-value.d.ts +12 -0
  47. package/dist/schema-form/default-value.d.ts.map +1 -1
  48. package/dist/schema-form/default-value.js +34 -3
  49. package/dist/schema-form/default-value.js.map +1 -1
  50. package/dist/schema-form/field-node.d.ts +7 -0
  51. package/dist/schema-form/field-node.d.ts.map +1 -1
  52. package/dist/schema-form/field-node.js +3 -2
  53. package/dist/schema-form/field-node.js.map +1 -1
  54. package/dist/schema-form/index.d.ts +11 -11
  55. package/dist/schema-form/index.js +11 -11
  56. package/dist/schema-form/object-fields.d.ts +3 -1
  57. package/dist/schema-form/object-fields.d.ts.map +1 -1
  58. package/dist/schema-form/object-fields.js +2 -2
  59. package/dist/schema-form/object-fields.js.map +1 -1
  60. package/dist/schema-form/string-field.d.ts +3 -2
  61. package/dist/schema-form/string-field.d.ts.map +1 -1
  62. package/dist/schema-form/string-field.js.map +1 -1
  63. package/dist/schema-form/union-field.d.ts +5 -2
  64. package/dist/schema-form/union-field.d.ts.map +1 -1
  65. package/dist/schema-form/union-field.js +68 -15
  66. package/dist/schema-form/union-field.js.map +1 -1
  67. package/package.json +3 -3
  68. package/src/components/components.css +18 -0
  69. package/src/components/dirty-guard.tsx +23 -13
  70. package/src/components/field.tsx +10 -5
  71. package/src/components/fleet-report.tsx +44 -13
  72. package/src/components/icons.tsx +19 -0
  73. package/src/host.ts +5 -1
  74. package/src/index.ts +24 -31
  75. package/src/navigation/context.tsx +16 -1
  76. package/src/navigation/types.ts +3 -0
  77. package/src/plugin/host-state.ts +18 -0
  78. package/src/plugin/types.ts +17 -7
  79. package/src/schema-form/SchemaForm.tsx +4 -3
  80. package/src/schema-form/SecretRefField.tsx +3 -2
  81. package/src/schema-form/context.ts +2 -2
  82. package/src/schema-form/default-value.ts +36 -3
  83. package/src/schema-form/field-node.tsx +21 -2
  84. package/src/schema-form/index.ts +11 -11
  85. package/src/schema-form/object-fields.tsx +4 -0
  86. package/src/schema-form/string-field.tsx +3 -2
  87. package/src/schema-form/union-field.tsx +85 -19
  88. package/dist/jq.d.ts +0 -31
  89. package/dist/jq.d.ts.map +0 -1
  90. package/dist/jq.js +0 -41
  91. package/dist/jq.js.map +0 -1
  92. package/src/jq.ts +0 -61
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';