@pipelex/mthds-form 0.11.0 → 0.12.1
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/{chunk-E2IVBAW3.js → chunk-2D4NEFUH.js} +293 -104
- package/dist/chunk-2D4NEFUH.js.map +1 -0
- package/dist/chunk-7KQXGG6J.js +127 -0
- package/dist/chunk-7KQXGG6J.js.map +1 -0
- package/dist/{chunk-TID7ZN63.js → chunk-CM4KVG53.js} +13 -10
- package/dist/chunk-CM4KVG53.js.map +1 -0
- package/dist/{chunk-4JQAJT7C.js → chunk-RRTI7AIR.js} +25 -38
- package/dist/chunk-RRTI7AIR.js.map +1 -0
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.js +3 -2
- package/dist/core/native-content.d.ts +6 -1
- package/dist/core/native-content.js +1 -1
- package/dist/core/save-plan.d.ts +145 -0
- package/dist/core/save-plan.js +6 -0
- package/dist/core/save-plan.js.map +1 -0
- package/dist/core/stuff-files.d.ts +26 -3
- package/dist/core/stuff-files.js +2 -2
- package/dist/generative/index.js +7 -5
- package/dist/generative/index.js.map +1 -1
- package/dist/react/index.d.ts +177 -108
- package/dist/react/index.js +4 -3
- package/package.json +1 -1
- package/dist/chunk-4JQAJT7C.js.map +0 -1
- package/dist/chunk-E2IVBAW3.js.map +0 -1
- package/dist/chunk-TID7ZN63.js.map +0 -1
|
@@ -28,10 +28,33 @@ interface StuffFile {
|
|
|
28
28
|
/** The file's own name when it states one — otherwise the caller derives it. */
|
|
29
29
|
filename?: string;
|
|
30
30
|
mimeType?: string;
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Where it sat, dotted, starting at the root's name:
|
|
33
|
+
* `report.attachments.2.scan`. A saved file with no name of its own is named
|
|
34
|
+
* by the base name and the segments after the first (`report-attachments-2-scan`),
|
|
35
|
+
* since the base name stands for the root, so a hand-built path must start at
|
|
36
|
+
* the root's name too, or its first real segment is lost.
|
|
37
|
+
*/
|
|
32
38
|
path: string;
|
|
33
|
-
kind:
|
|
39
|
+
kind: StuffFileKind;
|
|
34
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* What a file is: a picture, a document, or a page of markup the stuff carries
|
|
43
|
+
* inline. It is the descriptor's statement (the node's kind, or its concept for
|
|
44
|
+
* `native.Html`), never a reading of the bytes.
|
|
45
|
+
*/
|
|
46
|
+
type StuffFileKind = 'image' | 'document' | 'markup';
|
|
47
|
+
/**
|
|
48
|
+
* One file value, read as the file it is declared to be — or `undefined` when
|
|
49
|
+
* the value holds nothing to save (no URL, no markup).
|
|
50
|
+
*
|
|
51
|
+
* The walk below calls this for every file node it reaches, and the result view
|
|
52
|
+
* calls it for the one file a control is drawn beside, so a file's own download
|
|
53
|
+
* button and the whole-result download read the value the same way. `kind` is
|
|
54
|
+
* the caller's statement from the descriptor; this never inspects the value to
|
|
55
|
+
* decide what it is.
|
|
56
|
+
*/
|
|
57
|
+
declare function readStuffFile(kind: StuffFileKind, value: unknown, path: string): StuffFile | undefined;
|
|
35
58
|
/**
|
|
36
59
|
* Every file inside a stuff, found by walking the DESCRIPTOR — never the value.
|
|
37
60
|
*
|
|
@@ -50,4 +73,4 @@ interface StuffFile {
|
|
|
50
73
|
*/
|
|
51
74
|
declare function collectStuffFiles(field: RunField, value: unknown): StuffFile[];
|
|
52
75
|
|
|
53
|
-
export { type StuffFile, collectStuffFiles };
|
|
76
|
+
export { type StuffFile, type StuffFileKind, collectStuffFiles, readStuffFile };
|
package/dist/core/stuff-files.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { collectStuffFiles } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { collectStuffFiles, readStuffFile } from '../chunk-RRTI7AIR.js';
|
|
2
|
+
import '../chunk-CM4KVG53.js';
|
|
3
3
|
import '../chunk-V3OV2XQT.js';
|
|
4
4
|
//# sourceMappingURL=stuff-files.js.map
|
|
5
5
|
//# sourceMappingURL=stuff-files.js.map
|
package/dist/generative/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn, fieldControlClass, ResultField, FieldRenderer, ToggleGroup, ToggleGroupItem, Switch, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import
|
|
2
|
+
import { cn, fieldControlClass, ResultRoot, ResultField, FieldRenderer, ToggleGroup, ToggleGroupItem, Switch, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../chunk-2D4NEFUH.js';
|
|
3
|
+
import '../chunk-7KQXGG6J.js';
|
|
4
|
+
import '../chunk-RRTI7AIR.js';
|
|
5
|
+
import { isNativeValueNode, readDateContent, formatDateContent, isNativeHtmlNode, isNativeDateNode, isNativeCompositeNode } from '../chunk-CM4KVG53.js';
|
|
5
6
|
import '../chunk-FABY3DEY.js';
|
|
6
7
|
import '../chunk-XCO6GTEC.js';
|
|
7
8
|
import '../chunk-PM55AHRO.js';
|
|
@@ -2292,8 +2293,9 @@ function MthdsResult({ props }) {
|
|
|
2292
2293
|
const path = useAbsolutePath(props.path) ?? "";
|
|
2293
2294
|
const field = scope.result && path ? resultFieldAtPath(scope.result, path) : void 0;
|
|
2294
2295
|
const value = useStateValue(path);
|
|
2295
|
-
if (!field) return /* @__PURE__ */ jsx(Unresolved, { path: props.path, side: "result" });
|
|
2296
|
-
|
|
2296
|
+
if (!field || !scope.result) return /* @__PURE__ */ jsx(Unresolved, { path: props.path, side: "result" });
|
|
2297
|
+
const place = [scope.result.name, ...segmentsUnder(RESULT_ROOT, path) ?? []];
|
|
2298
|
+
return /* @__PURE__ */ jsx(ResultRoot, { baseName: scope.result.name, path: place, children: /* @__PURE__ */ jsx(ResultField, { field, value, hideLabel: props.hideLabel ?? false }) });
|
|
2297
2299
|
}
|
|
2298
2300
|
function AccessibleSelect({ props, bindings, emit }) {
|
|
2299
2301
|
const [boundValue, setBoundValue] = useBoundProp(
|