@pipelex/mthds-form 0.13.0 → 0.14.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 +11 -0
- package/dist/{chunk-IR3OFSGD.js → chunk-2EGRONBV.js} +3 -3
- package/dist/{chunk-IR3OFSGD.js.map → chunk-2EGRONBV.js.map} +1 -1
- package/dist/{chunk-D2EQVWGN.js → chunk-7JRT6ZII.js} +1631 -171
- package/dist/chunk-7JRT6ZII.js.map +1 -0
- package/dist/{chunk-7KQXGG6J.js → chunk-ICUEHNEH.js} +19 -6
- package/dist/chunk-ICUEHNEH.js.map +1 -0
- package/dist/{chunk-DARLDVJM.js → chunk-JIGRWJTV.js} +2 -2
- package/dist/chunk-JIGRWJTV.js.map +1 -0
- package/dist/chunk-VH5CDQDR.js +41 -0
- package/dist/chunk-VH5CDQDR.js.map +1 -0
- package/dist/{chunk-G6SFMTL4.js → chunk-VT5E5W4E.js} +4 -3
- package/dist/chunk-VT5E5W4E.js.map +1 -0
- package/dist/{chunk-MJQ7CXUB.js → chunk-XO5OENNF.js} +25 -4
- package/dist/chunk-XO5OENNF.js.map +1 -0
- package/dist/core/gate.js +2 -2
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.js +6 -5
- package/dist/core/output-form.d.ts +5 -4
- package/dist/core/output-form.js +1 -1
- package/dist/core/readiness.d.ts +47 -2
- package/dist/core/readiness.js +1 -1
- package/dist/core/save-plan.d.ts +31 -1
- package/dist/core/save-plan.js +1 -1
- package/dist/core/seed.d.ts +56 -0
- package/dist/core/seed.js +5 -0
- package/dist/core/seed.js.map +1 -0
- package/dist/core/values.js +2 -2
- package/dist/generative/index.d.ts +2 -11
- package/dist/generative/index.js +11 -17
- package/dist/generative/index.js.map +1 -1
- package/dist/react/index.d.ts +699 -192
- package/dist/react/index.js +9 -3
- package/dist/styles.css +1 -1
- package/package.json +3 -1
- package/dist/chunk-7KQXGG6J.js.map +0 -1
- package/dist/chunk-D2EQVWGN.js.map +0 -1
- package/dist/chunk-DARLDVJM.js.map +0 -1
- package/dist/chunk-G6SFMTL4.js.map +0 -1
- package/dist/chunk-MJQ7CXUB.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"seed.js"}
|
package/dist/core/values.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { apiInputsFromRunValues, fieldsForContract, inputDataFromWorkingMemory, outputsFromPipeOutput, rjsfDataFromRunValues, runValuesFromStore, setValueAtPath, storeInputDataFromRunValues } from '../chunk-
|
|
1
|
+
export { apiInputsFromRunValues, fieldsForContract, inputDataFromWorkingMemory, outputsFromPipeOutput, rjsfDataFromRunValues, runValuesFromStore, setValueAtPath, storeInputDataFromRunValues } from '../chunk-VT5E5W4E.js';
|
|
2
2
|
import '../chunk-ZB4RYUKV.js';
|
|
3
3
|
import '../chunk-XCO6GTEC.js';
|
|
4
4
|
import '../chunk-GCXV76WU.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-XO5OENNF.js';
|
|
6
6
|
import '../chunk-GKV77RAS.js';
|
|
7
7
|
import '../chunk-OD3VYXUY.js';
|
|
8
8
|
import '../chunk-WYH56SOZ.js';
|
|
@@ -8,6 +8,7 @@ import * as _json_render_react from '@json-render/react';
|
|
|
8
8
|
import { Components, Renderer } from '@json-render/react';
|
|
9
9
|
import * as zod_v4_core from 'zod/v4/core';
|
|
10
10
|
import { F as FieldEnv } from '../field-renderer-C5Onx6qB.js';
|
|
11
|
+
export { seedInputs } from '../core/seed.js';
|
|
11
12
|
import '../core/contracts.js';
|
|
12
13
|
import 'mthds/protocol';
|
|
13
14
|
import '../core/file-formats.js';
|
|
@@ -2023,16 +2024,6 @@ declare function absoluteHatchPath(spec: Spec, key: string, path: string, parent
|
|
|
2023
2024
|
* the model and the escape hatch read the same tree.
|
|
2024
2025
|
*/
|
|
2025
2026
|
declare function payloadToState(field: RunField, payload: unknown): unknown;
|
|
2026
|
-
/**
|
|
2027
|
-
* The `/inputs` seed: the authored defaults, and nothing else.
|
|
2028
|
-
*
|
|
2029
|
-
* A defaulted field carries `defaultValue` (never the `null` a schema
|
|
2030
|
-
* projection attaches to an optional field); a structure's defaults sit inside
|
|
2031
|
-
* it. What is NOT seeded is an empty string or a zero for an unfilled field -
|
|
2032
|
-
* the kernel's readiness treats an absent value as absent, and a seeded
|
|
2033
|
-
* placeholder would count as filled.
|
|
2034
|
-
*/
|
|
2035
|
-
declare function seedInputs(fields: readonly RunField[]): Record<string, unknown>;
|
|
2036
2027
|
|
|
2037
2028
|
/**
|
|
2038
2029
|
* A spec with its provenance - the shape every fixture takes, whoever produced
|
|
@@ -2103,4 +2094,4 @@ declare function fixtureLabel(fixture: Pick<SpecFixture, 'producer' | 'model' |
|
|
|
2103
2094
|
/** The fixture a story asks for, or a loud failure: a story must never render a page it did not name. */
|
|
2104
2095
|
declare function findFixture(fixtures: readonly SpecFixture[], pipeRef: string, id: string): SpecFixture;
|
|
2105
2096
|
|
|
2106
|
-
export { type BrandManifest, BrandProvider, type BriefSubject, COMPONENT_NAMES, COMPONENT_RENDERINGS, CUSTOM_COMPONENTS, type ComponentRendering, type CriticLoop, DESIGNER_BRIEF_CONCEPT, DESIGNER_CATALOG_CONCEPT, DescriptorProvider, type DescriptorScope, type DesignerAction, type DesignerBrief, type DesignerCatalog, type DesignerComponent, type DesignerPathEntry, GenerativePage, type GenerativePageProps, type GenerativeSpec, ICON_NAMES, INPUTS_ROOT, type LayoutDescriptor, METRIC_FORMATS, PICKED_SHADCN, PRODUCT_COMPONENTS, PROMPT_HASH, type PageRegistry, type Producer, type ProductComponentName, RESULT_ROOT, type ResultSlot, ResultSlotProvider, type SpecFixture, type SpecProblem, type SpecVerdict, type ValidationCatalog, absoluteHatchPath, brandManifestSchema, catalog, designerCatalog, fieldAtSegments, findFixture, fixtureId, fixtureLabel, formatProblems, generativeRegistry, generativeRenderers, inputBrief, inputFieldAtPath, isDelegatedInput, isDelegatedResult, joinPath, jsonlLines, layoutFits, layoutProblems, pathFromDomId, payloadToState, repeatBasePathOf, resultBrief, resultFieldAtPath,
|
|
2097
|
+
export { type BrandManifest, BrandProvider, type BriefSubject, COMPONENT_NAMES, COMPONENT_RENDERINGS, CUSTOM_COMPONENTS, type ComponentRendering, type CriticLoop, DESIGNER_BRIEF_CONCEPT, DESIGNER_CATALOG_CONCEPT, DescriptorProvider, type DescriptorScope, type DesignerAction, type DesignerBrief, type DesignerCatalog, type DesignerComponent, type DesignerPathEntry, GenerativePage, type GenerativePageProps, type GenerativeSpec, ICON_NAMES, INPUTS_ROOT, type LayoutDescriptor, METRIC_FORMATS, PICKED_SHADCN, PRODUCT_COMPONENTS, PROMPT_HASH, type PageRegistry, type Producer, type ProductComponentName, RESULT_ROOT, type ResultSlot, ResultSlotProvider, type SpecFixture, type SpecProblem, type SpecVerdict, type ValidationCatalog, absoluteHatchPath, brandManifestSchema, catalog, designerCatalog, fieldAtSegments, findFixture, fixtureId, fixtureLabel, formatProblems, generativeRegistry, generativeRenderers, inputBrief, inputFieldAtPath, isDelegatedInput, isDelegatedResult, joinPath, jsonlLines, layoutFits, layoutProblems, pathFromDomId, payloadToState, repeatBasePathOf, resultBrief, resultFieldAtPath, segmentsUnder, specFromJsonl, specToJsonl, useBrand, useDescriptorScope, useResultSlot, useStoreSnapshot, validateAgainstCatalog };
|
package/dist/generative/index.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn, fieldControlClass, ResultRoot, ResultField, FieldRenderer, ToggleGroup, ToggleGroupItem, Switch, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../chunk-
|
|
3
|
-
|
|
2
|
+
import { cn, fieldControlClass, ResultRoot, ResultField, FieldRenderer, ToggleGroup, ToggleGroupItem, Switch, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../chunk-7JRT6ZII.js';
|
|
3
|
+
export { seedInputs } from '../chunk-VH5CDQDR.js';
|
|
4
|
+
import '../chunk-VT5E5W4E.js';
|
|
5
|
+
import '../chunk-ICUEHNEH.js';
|
|
4
6
|
import '../chunk-RRTI7AIR.js';
|
|
5
7
|
import { isNativeValueNode, readDateContent, formatDateContent, isNativeHtmlNode, isNativeDateNode, isNativeCompositeNode } from '../chunk-CM4KVG53.js';
|
|
8
|
+
import '../chunk-ZB4RYUKV.js';
|
|
6
9
|
import '../chunk-FABY3DEY.js';
|
|
7
10
|
import '../chunk-XCO6GTEC.js';
|
|
8
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-GCXV76WU.js';
|
|
12
|
+
import '../chunk-XO5OENNF.js';
|
|
9
13
|
import '../chunk-GKV77RAS.js';
|
|
14
|
+
import '../chunk-OD3VYXUY.js';
|
|
15
|
+
import '../chunk-WYH56SOZ.js';
|
|
10
16
|
import { hasOwnProp } from '../chunk-V3OV2XQT.js';
|
|
11
17
|
import { defineSchema, defineCatalog, validateSpec, compileSpecStream } from '@json-render/core';
|
|
12
18
|
import { z } from 'zod';
|
|
@@ -903,7 +909,7 @@ function describe(field, path, depth, side, entries, seeded = false) {
|
|
|
903
909
|
entries.push(entry);
|
|
904
910
|
if (entry.delegated) return;
|
|
905
911
|
if (field.kind === "object") {
|
|
906
|
-
const seededBelow = seeded || field.defaultValue !== void 0;
|
|
912
|
+
const seededBelow = seeded || field.defaultValue !== void 0 || side === "input" && !field.required;
|
|
907
913
|
for (const child of field.fields) {
|
|
908
914
|
describe(child, joinPath(path, child.name), depth + 1, side, entries, seededBelow);
|
|
909
915
|
}
|
|
@@ -3042,18 +3048,6 @@ function payloadToState(field, payload) {
|
|
|
3042
3048
|
return field;
|
|
3043
3049
|
}
|
|
3044
3050
|
}
|
|
3045
|
-
function seedInputs(fields) {
|
|
3046
|
-
const seed = {};
|
|
3047
|
-
for (const field of fields) {
|
|
3048
|
-
if (field.defaultValue !== void 0) {
|
|
3049
|
-
seed[field.name] = field.defaultValue;
|
|
3050
|
-
} else if (field.kind === "object") {
|
|
3051
|
-
const nested = seedInputs(field.fields);
|
|
3052
|
-
if (Object.keys(nested).length > 0) seed[field.name] = nested;
|
|
3053
|
-
}
|
|
3054
|
-
}
|
|
3055
|
-
return seed;
|
|
3056
|
-
}
|
|
3057
3051
|
|
|
3058
3052
|
// src/generative/fixture.ts
|
|
3059
3053
|
function fixtureId(fixture) {
|
|
@@ -3090,6 +3084,6 @@ function findFixture(fixtures, pipeRef, id) {
|
|
|
3090
3084
|
return found;
|
|
3091
3085
|
}
|
|
3092
3086
|
|
|
3093
|
-
export { BrandProvider, COMPONENT_NAMES, COMPONENT_RENDERINGS, CUSTOM_COMPONENTS, DESIGNER_BRIEF_CONCEPT, DESIGNER_CATALOG_CONCEPT, DescriptorProvider, GenerativePage, ICON_NAMES, INPUTS_ROOT, METRIC_FORMATS, PICKED_SHADCN, PRODUCT_COMPONENTS, PROMPT_HASH, RESULT_ROOT, ResultSlotProvider, absoluteHatchPath, brandManifestSchema, catalog, designerCatalog, fieldAtSegments, findFixture, fixtureId, fixtureLabel, formatProblems, generativeRegistry, generativeRenderers, inputBrief, inputFieldAtPath, isDelegatedInput, isDelegatedResult, joinPath, jsonlLines, layoutFits, layoutProblems, pathFromDomId, payloadToState, repeatBasePathOf, resultBrief, resultFieldAtPath,
|
|
3087
|
+
export { BrandProvider, COMPONENT_NAMES, COMPONENT_RENDERINGS, CUSTOM_COMPONENTS, DESIGNER_BRIEF_CONCEPT, DESIGNER_CATALOG_CONCEPT, DescriptorProvider, GenerativePage, ICON_NAMES, INPUTS_ROOT, METRIC_FORMATS, PICKED_SHADCN, PRODUCT_COMPONENTS, PROMPT_HASH, RESULT_ROOT, ResultSlotProvider, absoluteHatchPath, brandManifestSchema, catalog, designerCatalog, fieldAtSegments, findFixture, fixtureId, fixtureLabel, formatProblems, generativeRegistry, generativeRenderers, inputBrief, inputFieldAtPath, isDelegatedInput, isDelegatedResult, joinPath, jsonlLines, layoutFits, layoutProblems, pathFromDomId, payloadToState, repeatBasePathOf, resultBrief, resultFieldAtPath, segmentsUnder, specFromJsonl, specToJsonl, useBrand, useDescriptorScope, useResultSlot, useStoreSnapshot, validateAgainstCatalog };
|
|
3094
3088
|
//# sourceMappingURL=index.js.map
|
|
3095
3089
|
//# sourceMappingURL=index.js.map
|