@pipelex/mthds-form 0.30.0 → 0.31.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/dist/brand/index.d.ts +9 -257
- package/dist/brand/index.js +9 -645
- package/dist/brand/index.js.map +1 -1
- package/dist/{chunk-ZX52CQJ4.js → chunk-2UCH4AAO.js} +3 -3
- package/dist/{chunk-ZX52CQJ4.js.map → chunk-2UCH4AAO.js.map} +1 -1
- package/dist/{chunk-JCFALTTY.js → chunk-ENK5QTUK.js} +116 -28
- package/dist/chunk-ENK5QTUK.js.map +1 -0
- package/dist/{chunk-ZB4RYUKV.js → chunk-HVWE3TTC.js} +3 -3
- package/dist/{chunk-ZB4RYUKV.js.map → chunk-HVWE3TTC.js.map} +1 -1
- package/dist/chunk-UZNRJWN5.js +721 -0
- package/dist/chunk-UZNRJWN5.js.map +1 -0
- package/dist/{chunk-IBBAJXIO.js → chunk-XVGAQ4RK.js} +4 -4
- package/dist/{chunk-IBBAJXIO.js.map → chunk-XVGAQ4RK.js.map} +1 -1
- package/dist/core/derive.js +2 -2
- package/dist/core/gate.js +3 -3
- package/dist/core/index.js +12 -12
- package/dist/core/values.js +3 -3
- package/dist/generative/index.d.ts +474 -79
- package/dist/generative/index.js +1195 -480
- package/dist/generative/index.js.map +1 -1
- package/dist/layout-design.mthds +133 -6
- package/dist/react/index.d.ts +18 -3
- package/dist/react/index.js +7 -7
- package/dist/styles-BoXPBjF4.d.ts +258 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-JCFALTTY.js.map +0 -1
- package/dist/chunk-QFX332LE.js +0 -22
- package/dist/chunk-QFX332LE.js.map +0 -1
- package/dist/manifest-DUeAWeqa.d.ts +0 -17
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { apiInputsFromRunValues, sameRunValues, runValuesFromInputs, setValueAtPath } from './chunk-2UCH4AAO.js';
|
|
1
2
|
import { planFileSave, planStuffSave, splitFileName, typedFileStem } from './chunk-4VAO6BDE.js';
|
|
2
3
|
import { seedInputs, closeOptionalStructures, openOptionalStructures } from './chunk-VH5CDQDR.js';
|
|
3
4
|
import { sourceFileValue, roomForChosenFiles, roomForDroppedFiles, addChosenFiles, placeDroppedFiles, chosenFilesAdded } from './chunk-L23R3JNQ.js';
|
|
4
5
|
import { readStuffFile } from './chunk-56WECFBD.js';
|
|
5
|
-
import {
|
|
6
|
+
import { shownAsOptional, isFoldedOptional, anyOptionalStructureOpen, isOptionalStructure, computeReadiness, optionalStructureOpen, mustBeFilled, fieldFilled, isFilled } from './chunk-XO5OENNF.js';
|
|
6
7
|
import { enumValueLabeler, humanizeFieldName, humanizeEnumValue } from './chunk-GHVVULHY.js';
|
|
7
8
|
import { TYPED_SCALAR_MARKERS, viewableUrl, splitCitations, webHref, isNativeDateNode, isNativeHtmlNode, readHtmlContent, isNativeCompositeNode, readCompositeContent, isNativePageNode, nativeVerdictOf, isNativeSearchResultNode, readSearchResultContent, isNativeValueNode, readDateContent, formatDateContent, readPageContent, readYesNoContent, readRatingContent, readChoiceContent, readDocumentContent, readImageContent, readDataUrl, citedSource } from './chunk-QQK6Y55E.js';
|
|
8
|
-
import { buildRunFields } from './chunk-
|
|
9
|
+
import { buildRunFields } from './chunk-HVWE3TTC.js';
|
|
10
|
+
import { ownProp } from './chunk-V3OV2XQT.js';
|
|
9
11
|
import { conceptCategory } from './chunk-FABY3DEY.js';
|
|
10
12
|
import { acceptLabel, acceptMap, isAcceptedFile, normalizeMimeType, formatOfFilename, DOCUMENT_FORMATS, IMAGE_FORMATS } from './chunk-XCO6GTEC.js';
|
|
11
|
-
import { shownAsOptional, isFoldedOptional, anyOptionalStructureOpen, isOptionalStructure, computeReadiness, optionalStructureOpen, mustBeFilled, fieldFilled, isFilled } from './chunk-XO5OENNF.js';
|
|
12
|
-
import { ownProp } from './chunk-V3OV2XQT.js';
|
|
13
13
|
import { toStoredDateValue, toDateInputValue } from './chunk-GKV77RAS.js';
|
|
14
14
|
import { clsx } from 'clsx';
|
|
15
15
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -88,7 +88,7 @@ var Switch = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
88
88
|
SwitchPrimitives.Root,
|
|
89
89
|
{
|
|
90
90
|
className: cn(
|
|
91
|
-
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-
|
|
91
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted-foreground",
|
|
92
92
|
"max-sm:relative max-sm:after:absolute max-sm:after:-inset-x-0.5 max-sm:after:-inset-y-3 max-sm:after:content-['']",
|
|
93
93
|
className
|
|
94
94
|
),
|
|
@@ -582,7 +582,18 @@ function FieldShell({
|
|
|
582
582
|
}
|
|
583
583
|
),
|
|
584
584
|
!isApp && /* @__PURE__ */ jsx(ConceptPill, { conceptRef, category }),
|
|
585
|
-
!required &&
|
|
585
|
+
!required && // In `app` the mark is in the body face, as the label beside it is:
|
|
586
|
+
// a monospace tag was a third face on a host's page.
|
|
587
|
+
/* @__PURE__ */ jsx(
|
|
588
|
+
"span",
|
|
589
|
+
{
|
|
590
|
+
className: cn(
|
|
591
|
+
"ml-auto text-[10px] uppercase tracking-wider text-muted-foreground",
|
|
592
|
+
!isApp && "font-mono"
|
|
593
|
+
),
|
|
594
|
+
children: s.optionalBadge
|
|
595
|
+
}
|
|
596
|
+
)
|
|
586
597
|
] }),
|
|
587
598
|
description && /* @__PURE__ */ jsx("p", { className: "text-[12px] leading-relaxed text-muted-foreground", children: description }),
|
|
588
599
|
/* @__PURE__ */ jsx(
|
|
@@ -1715,7 +1726,8 @@ function FileField({
|
|
|
1715
1726
|
disabled: busy,
|
|
1716
1727
|
onClick: () => setShowUrl(true),
|
|
1717
1728
|
className: cn(
|
|
1718
|
-
"flex w-fit items-center gap-1 rounded-sm
|
|
1729
|
+
"flex w-fit items-center gap-1 rounded-sm text-[11px] text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50 max-sm:min-h-11",
|
|
1730
|
+
presentation !== "app" && "font-mono",
|
|
1719
1731
|
focusOutlineClass,
|
|
1720
1732
|
"focus-visible:outline-offset-2"
|
|
1721
1733
|
),
|
|
@@ -2192,10 +2204,13 @@ function OptionalToggle({ count, expanded, onToggle, noun = "field" }) {
|
|
|
2192
2204
|
);
|
|
2193
2205
|
}
|
|
2194
2206
|
var StructureDepthContext = createContext(0);
|
|
2195
|
-
|
|
2207
|
+
var FramedFormContext = createContext(false);
|
|
2208
|
+
function structureGrouping(depth, labelled, framed) {
|
|
2196
2209
|
if (!labelled) return "none";
|
|
2197
|
-
|
|
2210
|
+
if (depth > 0) return "rule";
|
|
2211
|
+
return framed ? "section" : "box";
|
|
2198
2212
|
}
|
|
2213
|
+
var SECTION_ERROR_EDGE = "pointer-events-none absolute inset-y-0 -start-[7px] m-0 w-[3px] rounded-full bg-destructive";
|
|
2199
2214
|
function structureNameClass(isApp, depth) {
|
|
2200
2215
|
if (!isApp) return "font-mono text-[13px] font-medium leading-none";
|
|
2201
2216
|
return cn(
|
|
@@ -2210,7 +2225,7 @@ function ObjectField({ field, value, onChange, id, error, env }) {
|
|
|
2210
2225
|
const depth = use(StructureDepthContext);
|
|
2211
2226
|
const data = value ?? {};
|
|
2212
2227
|
const label = fieldLabel(field.title, field.name, presentation);
|
|
2213
|
-
const grouping = structureGrouping(depth, label.trim() !== "");
|
|
2228
|
+
const grouping = structureGrouping(depth, label.trim() !== "", use(FramedFormContext));
|
|
2214
2229
|
const domId = useFieldDomId(id);
|
|
2215
2230
|
const setChild = (name, childValue) => onChange({ ...data, [name]: childValue });
|
|
2216
2231
|
const folded = field.fields.filter((f) => isFoldedOptional(f, ownProp(data, f.name)));
|
|
@@ -2233,10 +2248,13 @@ function ObjectField({ field, value, onChange, id, error, env }) {
|
|
|
2233
2248
|
"aria-labelledby": nameId,
|
|
2234
2249
|
"aria-describedby": field.description ? descriptionId : void 0
|
|
2235
2250
|
};
|
|
2236
|
-
|
|
2251
|
+
const section = grouping === "section";
|
|
2252
|
+
const caption = error && /* @__PURE__ */ jsx("p", { className: "text-[11px] text-destructive", role: "alert", children: error });
|
|
2253
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2237
2254
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-1", children: [
|
|
2238
2255
|
/* @__PURE__ */ jsx("span", { id: nameId, className: cn("text-foreground", structureNameClass(isApp, depth)), children: label }),
|
|
2239
|
-
!isApp && /* @__PURE__ */ jsx(ConceptPill, { conceptRef: field.conceptRef, category: "structured" })
|
|
2256
|
+
!isApp && /* @__PURE__ */ jsx(ConceptPill, { conceptRef: field.conceptRef, category: "structured" }),
|
|
2257
|
+
section && caption
|
|
2240
2258
|
] }),
|
|
2241
2259
|
field.description && /* @__PURE__ */ jsx("p", { id: descriptionId, className: "text-[12px] leading-relaxed text-muted-foreground", children: field.description }),
|
|
2242
2260
|
/* @__PURE__ */ jsxs(
|
|
@@ -2246,8 +2264,9 @@ function ObjectField({ field, value, onChange, id, error, env }) {
|
|
|
2246
2264
|
className: cn(
|
|
2247
2265
|
"space-y-4",
|
|
2248
2266
|
grouping === "box" && "rounded-lg border bg-card/40 p-4 max-sm:p-3",
|
|
2267
|
+
grouping === "section" && "pt-2",
|
|
2249
2268
|
grouping === "rule" && "border-l-2 pl-4 max-sm:pl-3",
|
|
2250
|
-
grouping
|
|
2269
|
+
(grouping === "box" || grouping === "rule") && (error ? "border-destructive/50" : "border-border")
|
|
2251
2270
|
),
|
|
2252
2271
|
children: [
|
|
2253
2272
|
/* @__PURE__ */ jsx(StructureDepthContext, { value: depth + 1, children: visible.map((child) => /* @__PURE__ */ jsx(
|
|
@@ -2273,8 +2292,26 @@ function ObjectField({ field, value, onChange, id, error, env }) {
|
|
|
2273
2292
|
]
|
|
2274
2293
|
}
|
|
2275
2294
|
),
|
|
2276
|
-
|
|
2295
|
+
!section && caption
|
|
2277
2296
|
] });
|
|
2297
|
+
return /* @__PURE__ */ jsx(
|
|
2298
|
+
"div",
|
|
2299
|
+
{
|
|
2300
|
+
className: section ? void 0 : "space-y-2",
|
|
2301
|
+
"data-form-section": section ? "" : void 0,
|
|
2302
|
+
...group,
|
|
2303
|
+
children: section ? (
|
|
2304
|
+
// The section's content, without the padding `MethodForm`'s
|
|
2305
|
+
// hairlines give the section's own box: what the error edge runs
|
|
2306
|
+
// beside. Positioned whether or not it is in error, so an error
|
|
2307
|
+
// changes nothing a descendant is placed against.
|
|
2308
|
+
/* @__PURE__ */ jsxs("div", { className: "relative space-y-2", children: [
|
|
2309
|
+
error && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", "data-error-edge": "", className: SECTION_ERROR_EDGE }),
|
|
2310
|
+
content
|
|
2311
|
+
] })
|
|
2312
|
+
) : content
|
|
2313
|
+
}
|
|
2314
|
+
);
|
|
2278
2315
|
}
|
|
2279
2316
|
|
|
2280
2317
|
// src/react/focus.ts
|
|
@@ -2416,6 +2453,7 @@ function ListField({ field, value, onChange, id, error, env }) {
|
|
|
2416
2453
|
onChange(items.filter((_, i) => i !== index));
|
|
2417
2454
|
};
|
|
2418
2455
|
const addItem = () => onChange([...items, emptyValue(field.item)]);
|
|
2456
|
+
const structuredRows = field.item.kind === "object";
|
|
2419
2457
|
const busy = listIsBusy(id, env?.uploadingIds) || arriving.size > 0;
|
|
2420
2458
|
const hostErrors = env?.uploadErrors;
|
|
2421
2459
|
useEffect(() => {
|
|
@@ -2522,8 +2560,17 @@ function ListField({ field, value, onChange, id, error, env }) {
|
|
|
2522
2560
|
}
|
|
2523
2561
|
),
|
|
2524
2562
|
!isApp && /* @__PURE__ */ jsx(ConceptPill, { conceptRef: field.conceptRef, category: "list" }),
|
|
2525
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
2526
|
-
shownAsOptional(field) && /* @__PURE__ */ jsx(
|
|
2563
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-[10.5px] text-muted-foreground", !isApp && "font-mono"), children: field.itemCount !== void 0 && field.maxItemCount === field.itemCount ? s.itemsCountOf(items.length, field.itemCount) : s.itemsCount(items.length) }),
|
|
2564
|
+
shownAsOptional(field) && /* @__PURE__ */ jsx(
|
|
2565
|
+
"span",
|
|
2566
|
+
{
|
|
2567
|
+
className: cn(
|
|
2568
|
+
"ml-auto text-[10px] uppercase tracking-wider text-muted-foreground",
|
|
2569
|
+
!isApp && "font-mono"
|
|
2570
|
+
),
|
|
2571
|
+
children: s.optionalBadge
|
|
2572
|
+
}
|
|
2573
|
+
)
|
|
2527
2574
|
] }),
|
|
2528
2575
|
field.description && /* @__PURE__ */ jsx("p", { className: "text-[12px] leading-relaxed text-muted-foreground", children: field.description }),
|
|
2529
2576
|
/* @__PURE__ */ jsxs("div", { ref: rowsRef, className: "space-y-2", children: [
|
|
@@ -2532,10 +2579,26 @@ function ListField({ field, value, onChange, id, error, env }) {
|
|
|
2532
2579
|
"div",
|
|
2533
2580
|
{
|
|
2534
2581
|
"data-list-row": true,
|
|
2535
|
-
className:
|
|
2582
|
+
className: cn(
|
|
2583
|
+
"rounded-md border border-border bg-card/40 p-3",
|
|
2584
|
+
// A row holding a structure puts its number and its remove
|
|
2585
|
+
// button on a line of their own, so its fields take the row's
|
|
2586
|
+
// whole width: beside the button every input in the row ended
|
|
2587
|
+
// a button short of the edge, a third of a phone's row.
|
|
2588
|
+
structuredRows ? "grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-2 gap-y-1" : "flex items-start gap-2"
|
|
2589
|
+
),
|
|
2536
2590
|
children: [
|
|
2537
|
-
/* @__PURE__ */ jsx(
|
|
2538
|
-
|
|
2591
|
+
/* @__PURE__ */ jsx(
|
|
2592
|
+
"span",
|
|
2593
|
+
{
|
|
2594
|
+
className: cn(
|
|
2595
|
+
"shrink-0 font-mono text-[11px] text-muted-foreground",
|
|
2596
|
+
structuredRows ? "col-start-1 row-start-1" : "mt-1 w-5 text-center"
|
|
2597
|
+
),
|
|
2598
|
+
children: index + 1
|
|
2599
|
+
}
|
|
2600
|
+
),
|
|
2601
|
+
/* @__PURE__ */ jsx("div", { className: structuredRows ? "col-span-3 row-start-2 min-w-0" : "min-w-0 flex-1", children: /* @__PURE__ */ jsx(
|
|
2539
2602
|
FieldRenderer,
|
|
2540
2603
|
{
|
|
2541
2604
|
field: {
|
|
@@ -2558,7 +2621,8 @@ function ListField({ field, value, onChange, id, error, env }) {
|
|
|
2558
2621
|
disabled: env?.disabled || busy,
|
|
2559
2622
|
"aria-label": s.removeItemAria(index + 1),
|
|
2560
2623
|
className: cn(
|
|
2561
|
-
"
|
|
2624
|
+
"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-destructive disabled:opacity-50 max-sm:size-11",
|
|
2625
|
+
structuredRows ? "col-start-3 row-start-1" : "mt-0.5 max-sm:mt-0",
|
|
2562
2626
|
focusOutlineClass
|
|
2563
2627
|
),
|
|
2564
2628
|
children: /* @__PURE__ */ jsx(Trash2, { className: "h-3.5 w-3.5" })
|
|
@@ -3719,8 +3783,8 @@ function useMethodForm({
|
|
|
3719
3783
|
exampleSource
|
|
3720
3784
|
};
|
|
3721
3785
|
}
|
|
3722
|
-
function MethodForm({ locale, strings, presentation, ...props }) {
|
|
3723
|
-
let body = /* @__PURE__ */ jsx(MethodFormFields, { ...props });
|
|
3786
|
+
function MethodForm({ locale, strings, presentation, framed, ...props }) {
|
|
3787
|
+
let body = /* @__PURE__ */ jsx(FramedFormContext, { value: framed ?? false, children: /* @__PURE__ */ jsx(MethodFormFields, { ...props, framed }) });
|
|
3724
3788
|
if (presentation) {
|
|
3725
3789
|
body = /* @__PURE__ */ jsx(FieldPresentationProvider, { presentation, children: body });
|
|
3726
3790
|
}
|
|
@@ -3729,6 +3793,7 @@ function MethodForm({ locale, strings, presentation, ...props }) {
|
|
|
3729
3793
|
}
|
|
3730
3794
|
return body;
|
|
3731
3795
|
}
|
|
3796
|
+
var SECTION_RULES = "[&>[data-form-section]:not(:last-child)]:border-b [&>[data-form-section]:not(:last-child)]:border-border [&>[data-form-section]:not(:last-child)]:pb-6 [&>:not([data-form-section])+[data-form-section]]:border-t [&>:not([data-form-section])+[data-form-section]]:border-border [&>:not([data-form-section])+[data-form-section]]:pt-6";
|
|
3732
3797
|
function MethodFormFields({
|
|
3733
3798
|
form,
|
|
3734
3799
|
disabled,
|
|
@@ -3736,6 +3801,7 @@ function MethodFormFields({
|
|
|
3736
3801
|
resolveUrl,
|
|
3737
3802
|
foldOptional = true,
|
|
3738
3803
|
errors,
|
|
3804
|
+
framed,
|
|
3739
3805
|
className
|
|
3740
3806
|
}) {
|
|
3741
3807
|
const s = useFieldStrings();
|
|
@@ -3813,7 +3879,7 @@ function MethodFormFields({
|
|
|
3813
3879
|
if (mustBeFilled(field)) return fieldFilled(field, value) ? void 0 : s.requiredField;
|
|
3814
3880
|
return isFilled(value) && !fieldFilled(field, value) ? s.incompleteField : void 0;
|
|
3815
3881
|
};
|
|
3816
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-6", className), children: [
|
|
3882
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-6", framed && SECTION_RULES, className), children: [
|
|
3817
3883
|
exampleSource && /* @__PURE__ */ jsx(
|
|
3818
3884
|
FillWithExample,
|
|
3819
3885
|
{
|
|
@@ -8417,6 +8483,22 @@ function JsonView({ value }) {
|
|
|
8417
8483
|
return () => window.clearTimeout(timer);
|
|
8418
8484
|
}, [copied]);
|
|
8419
8485
|
const text = value === null || value === void 0 ? void 0 : typeof value === "object" ? stringifyValue(value) : JSON.stringify(value);
|
|
8486
|
+
const block = useRef(null);
|
|
8487
|
+
const [overflows, setOverflows] = useState(false);
|
|
8488
|
+
useEffect(() => {
|
|
8489
|
+
const pre = block.current;
|
|
8490
|
+
if (!pre) return;
|
|
8491
|
+
const measure = () => setOverflows(pre.scrollWidth > pre.clientWidth);
|
|
8492
|
+
measure();
|
|
8493
|
+
const fonts = typeof document === "undefined" ? void 0 : document.fonts;
|
|
8494
|
+
fonts?.addEventListener("loadingdone", measure);
|
|
8495
|
+
const observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(measure);
|
|
8496
|
+
observer?.observe(pre);
|
|
8497
|
+
return () => {
|
|
8498
|
+
fonts?.removeEventListener("loadingdone", measure);
|
|
8499
|
+
observer?.disconnect();
|
|
8500
|
+
};
|
|
8501
|
+
}, [text]);
|
|
8420
8502
|
if (text === void 0) {
|
|
8421
8503
|
return /* @__PURE__ */ jsx(Absent, {});
|
|
8422
8504
|
}
|
|
@@ -8440,9 +8522,10 @@ function JsonView({ value }) {
|
|
|
8440
8522
|
/* @__PURE__ */ jsx(
|
|
8441
8523
|
"pre",
|
|
8442
8524
|
{
|
|
8525
|
+
ref: block,
|
|
8443
8526
|
role: "group",
|
|
8444
8527
|
"aria-label": s.viewJson,
|
|
8445
|
-
tabIndex: 0,
|
|
8528
|
+
...overflows ? { tabIndex: 0 } : {},
|
|
8446
8529
|
className: cn(
|
|
8447
8530
|
"overflow-x-auto rounded-lg border border-border bg-card/40 px-3.5 py-3 pr-12 font-mono text-[12px] leading-relaxed",
|
|
8448
8531
|
canCopy && "max-sm:min-h-[60px] max-sm:pr-14",
|
|
@@ -8453,6 +8536,11 @@ function JsonView({ value }) {
|
|
|
8453
8536
|
)
|
|
8454
8537
|
] });
|
|
8455
8538
|
}
|
|
8539
|
+
function underHostName(field, name) {
|
|
8540
|
+
const renamed = { ...field, name };
|
|
8541
|
+
delete renamed.title;
|
|
8542
|
+
return renamed;
|
|
8543
|
+
}
|
|
8456
8544
|
function isShownResult(attempt, field, baseName, value) {
|
|
8457
8545
|
if (attempt.field === field && attempt.baseName === baseName && attempt.value === value) {
|
|
8458
8546
|
return true;
|
|
@@ -8484,7 +8572,7 @@ function StuffPanel({
|
|
|
8484
8572
|
const s = useFieldStrings();
|
|
8485
8573
|
const presentation = useFieldPresentation();
|
|
8486
8574
|
const offered = viewsProp && viewsProp.length > 0 ? viewsProp : viewsProp || presentation === "app" ? RESULT_ONLY : ALL_VIEWS;
|
|
8487
|
-
const named = name ?
|
|
8575
|
+
const named = name ? underHostName(field, name) : field;
|
|
8488
8576
|
const baseName = downloadBaseName ?? named.name ?? "result";
|
|
8489
8577
|
const [chosen, setView] = useState(defaultView);
|
|
8490
8578
|
const view = offered.includes(chosen) ? chosen : offered[0] ?? "rendered";
|
|
@@ -8651,6 +8739,6 @@ function pdfFileName(field, value, baseName) {
|
|
|
8651
8739
|
return name === void 0 ? "" : name.replace(/\.[^.]+$/, "");
|
|
8652
8740
|
}
|
|
8653
8741
|
|
|
8654
|
-
export { BooleanField, ConceptPill, DEFAULT_FIELD_STRINGS, DateField, DocumentField, EN_FIELD_STRINGS, EnumField, FIELD_STRINGS_BY_LOCALE, FR_FIELD_STRINGS, FieldDomIdProvider, FieldPresentationProvider, FieldRenderer, FieldShell, FieldStringsProvider, FilePicker, FilePickerEntry, FillWithExample, HtmlPreview, ImageField, JsonView, ListField, Markdown, MethodForm, NumberField, ObjectField, OptionalToggle, PdfDownloadButton, ProseField, ResultEnvProvider, ResultField, ResultRoot, SUPPORTED_LOCALES, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, StuffViewer, Switch, TextField, ToggleGroup, ToggleGroupItem, UnknownField, actionShadowClass, checkedAccentClass, cn, enumLabeler, fieldControlClass, fieldStringsFor, focusOutlineClass, headingClass, linkTextClass, panelFlatShadowClass, panelRaisedShadowClass, panelSurfaceClass, renderHtmlPdf, resolveHtmlStorageUrls, saveInBrowser, selectedBorderClass, selectedFillClass, selectedFillStrongClass, useFieldDomId, useFieldPresentation, useFieldStrings, useMethodForm, useProseImages, useResolveRendition, useResolveShareUrl, useResolveUrl, useResolvedUrl };
|
|
8655
|
-
//# sourceMappingURL=chunk-
|
|
8656
|
-
//# sourceMappingURL=chunk-
|
|
8742
|
+
export { BooleanField, ConceptPill, DEFAULT_FIELD_STRINGS, DateField, DocumentField, EN_FIELD_STRINGS, EnumField, FIELD_STRINGS_BY_LOCALE, FR_FIELD_STRINGS, FieldDomIdProvider, FieldPresentationProvider, FieldRenderer, FieldShell, FieldStringsProvider, FilePicker, FilePickerEntry, FillWithExample, HtmlPreview, ImageField, JsonView, ListField, Markdown, MethodForm, NumberField, ObjectField, OptionalToggle, PdfDownloadButton, ProseField, ResultEnvProvider, ResultField, ResultRoot, SUPPORTED_LOCALES, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, StuffViewer, Switch, TextField, ToggleGroup, ToggleGroupItem, UnknownField, actionShadowClass, checkedAccentClass, cn, enumLabeler, fieldControlClass, fieldStringsFor, focusOutlineClass, headingClass, isThenable, linkTextClass, panelFlatShadowClass, panelRaisedShadowClass, panelSurfaceClass, renderHtmlPdf, resolveHtmlStorageUrls, saveInBrowser, selectedBorderClass, selectedFillClass, selectedFillStrongClass, useFieldDomId, useFieldPresentation, useFieldStrings, useMethodForm, useProseImages, useResolveRendition, useResolveShareUrl, useResolveUrl, useResolvedUrl };
|
|
8743
|
+
//# sourceMappingURL=chunk-ENK5QTUK.js.map
|
|
8744
|
+
//# sourceMappingURL=chunk-ENK5QTUK.js.map
|