@pipelex/mthds-form 0.19.0 → 0.20.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.
@@ -40,6 +40,16 @@ declare function deflateInput(value: unknown, conceptCode: string): unknown;
40
40
  * - { concept, content } → content (for custom concepts)
41
41
  */
42
42
  declare function inflateInput(value: unknown, conceptCode: string): unknown;
43
+ /**
44
+ * Detect the fully-qualified wrapper form `{ concept: "...", content: ... }`.
45
+ * pipelex accepts this for any concept (native or custom), and the mthds-inputs
46
+ * agent skill writes it by default for disambiguation. We unwrap before applying
47
+ * concept-specific inflation so the form populates correctly.
48
+ */
49
+ declare function isWrappedForm(value: unknown): value is {
50
+ concept: string;
51
+ content: unknown;
52
+ };
43
53
  interface InputSchema {
44
54
  concept_ref: string;
45
55
  json_schema?: Record<string, unknown>;
@@ -92,4 +102,4 @@ declare function pruneEmptyOptionals(value: unknown, rawSchema: Record<string, u
92
102
  */
93
103
  declare function inflateAllInputs(simplifiedData: Record<string, unknown>, inputSchemas: Record<string, InputSchema>): Record<string, unknown>;
94
104
 
95
- export { deflateAllInputs, deflateInput, healStringWrappers, inflateAllInputs, inflateInput, pruneEmptyOptionals, resolveConceptCode };
105
+ export { deflateAllInputs, deflateInput, healStringWrappers, inflateAllInputs, inflateInput, isWrappedForm, pruneEmptyOptionals, resolveConceptCode };
@@ -1,4 +1,4 @@
1
- export { deflateAllInputs, deflateInput, healStringWrappers, inflateAllInputs, inflateInput, pruneEmptyOptionals, resolveConceptCode } from '../chunk-HQMXXK5X.js';
1
+ export { deflateAllInputs, deflateInput, healStringWrappers, inflateAllInputs, inflateInput, isWrappedForm, pruneEmptyOptionals, resolveConceptCode } from '../chunk-E6BIXJ6C.js';
2
2
  import '../chunk-OD3VYXUY.js';
3
3
  import '../chunk-V3OV2XQT.js';
4
4
  import '../chunk-GKV77RAS.js';
@@ -1,5 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { RunField } from './core/descriptor.js';
3
+ import { FileSource } from './core/sources.js';
3
4
 
4
5
  /**
5
6
  * Ambient state that any field in the tree may need, threaded unchanged through
@@ -45,6 +46,14 @@ interface FieldEnv {
45
46
  /** Resolve a `pipelex-storage://` URI to a browser-viewable URL (for previews
46
47
  * of already-stored files). */
47
48
  resolveUrl?: (uri: string) => Promise<string | null>;
49
+ /**
50
+ * Where a file field can take a file the host already stores. Its presence
51
+ * is the capability, as `onDropFile`'s is: every empty file field then
52
+ * offers "Choose from your team's files", and a list of files offers it for
53
+ * several at once. The choice is written as `{ url, filename }`, exactly as
54
+ * an upload's result is. See docs/sources.md.
55
+ */
56
+ fileSource?: FileSource;
48
57
  }
49
58
  interface FieldRendererProps {
50
59
  field: RunField;
@@ -9,11 +9,12 @@ import { Components, Renderer } from '@json-render/react';
9
9
  import { B as BrandManifest } from '../manifest-DUeAWeqa.js';
10
10
  export { b as brandManifestSchema } from '../manifest-DUeAWeqa.js';
11
11
  import * as zod_v4_core from 'zod/v4/core';
12
- import { F as FieldEnv } from '../field-renderer-C5Onx6qB.js';
12
+ import { F as FieldEnv } from '../field-renderer-B3g16qZT.js';
13
13
  export { seedInputs } from '../core/seed.js';
14
14
  import '../core/contracts.js';
15
15
  import 'mthds/protocol';
16
16
  import '../core/file-formats.js';
17
+ import '../core/sources.js';
17
18
 
18
19
  /**
19
20
  * Whether a spec is one this catalog can render - the check every source
@@ -1,15 +1,16 @@
1
1
  "use client";
2
- import { cn, fieldControlClass, ResultRoot, ResultField, FieldRenderer, ToggleGroup, ToggleGroupItem, Switch, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../chunk-QCGIH3WY.js';
2
+ import { cn, fieldControlClass, ResultRoot, ResultField, FieldRenderer, ToggleGroup, ToggleGroupItem, Switch, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../chunk-CSLDIWB6.js';
3
3
  import '../chunk-ICUEHNEH.js';
4
4
  export { seedInputs } from '../chunk-VH5CDQDR.js';
5
+ import '../chunk-EQJBM3NS.js';
5
6
  import '../chunk-RRTI7AIR.js';
6
- import '../chunk-MEXWXLR7.js';
7
+ import '../chunk-ZX52CQJ4.js';
7
8
  import { isNativeValueNode, readDateContent, formatDateContent, isNativeHtmlNode, isNativeDateNode, isNativeCompositeNode } from '../chunk-CM4KVG53.js';
8
9
  export { brandManifestSchema } from '../chunk-QFX332LE.js';
9
10
  import '../chunk-ZB4RYUKV.js';
10
11
  import '../chunk-FABY3DEY.js';
11
12
  import '../chunk-XCO6GTEC.js';
12
- import '../chunk-HQMXXK5X.js';
13
+ import '../chunk-E6BIXJ6C.js';
13
14
  import '../chunk-XO5OENNF.js';
14
15
  import '../chunk-OD3VYXUY.js';
15
16
  import '../chunk-WYH56SOZ.js';