@phis/ui 0.5.4 → 0.5.6

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 (129) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +17 -7
  2. package/components/controls/phi-anchor-nav-control.js +18 -1
  3. package/components/layouts/clients/phi-flex-layout-client.js +17 -2
  4. package/components/layouts/clients/phi-layout-anchored-overlay.d.ts +2 -0
  5. package/components/layouts/clients/phi-layout-anchored-overlay.js +2 -0
  6. package/components/regions/presets/content-entry-editor-page-tree.js +2 -0
  7. package/components/regions/presets/content-entry-public-page-trees.js +2 -0
  8. package/components/widgets/builder/stack-tabs.d.ts +2 -1
  9. package/components/widgets/builder/stack-tabs.js +18 -2
  10. package/components/widgets/config/choice-shared.d.ts +0 -48
  11. package/components/widgets/config/choice-shared.js +0 -1
  12. package/components/widgets/config/stack-tabs.js +4 -3
  13. package/components/widgets/shared/card-body-client.d.ts +6 -2
  14. package/components/widgets/shared/card-body-client.js +27 -20
  15. package/components/widgets/shared/card-vocabulary.d.ts +7 -0
  16. package/components/widgets/shared/card-vocabulary.js +6 -0
  17. package/components/widgets/shared/markdown-body-client.js +7 -2
  18. package/constants/module-identity.d.ts +8 -0
  19. package/constants/module-identity.js +13 -0
  20. package/gateway/server-module-media.d.ts +12 -0
  21. package/gateway/server-module-media.js +83 -0
  22. package/helpers/cms-navigation-catalog.js +4 -1
  23. package/helpers/cms-page-catalog.d.ts +7 -0
  24. package/helpers/cms-preset-page-tree.js +16 -1
  25. package/helpers/config-text-fields.d.ts +49 -0
  26. package/helpers/config-text-fields.js +122 -0
  27. package/helpers/module-media-check.d.ts +23 -0
  28. package/helpers/module-media-check.js +32 -0
  29. package/helpers/module-media.d.ts +7 -0
  30. package/helpers/module-media.js +15 -0
  31. package/helpers/preset-text-source-check.d.ts +22 -0
  32. package/helpers/preset-text-source-check.js +45 -0
  33. package/helpers/route-address-check.d.ts +35 -0
  34. package/helpers/route-address-check.js +28 -0
  35. package/helpers/text-source.d.ts +14 -5
  36. package/helpers/text-source.js +16 -3
  37. package/module-page-check.d.ts +3 -0
  38. package/module-page-check.js +3 -0
  39. package/package.json +1 -1
  40. package/plugins/runtime/phi-slot-child-frame-view.js +1 -1
  41. package/plugins/runtime/slot-size-policy.d.ts +8 -2
  42. package/plugins/runtime/slot-size-policy.js +51 -16
  43. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-page-tree.js +2 -0
  44. package/plugins/runtime-modules/builder/area-shell-presets.server.js +2 -0
  45. package/plugins/runtime-modules/builder/clients/widget-inspector.js +2 -2
  46. package/plugins/runtime-modules/builder/navigation-folder-drop.js +2 -1
  47. package/plugins/runtime-modules/builder/options-providers.js +7 -1
  48. package/plugins/runtime-modules/builder/page-presets.server.js +2 -0
  49. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +3 -0
  50. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +11 -0
  51. package/plugins/runtime-modules/core/widgets/breadcrumb/server.js +9 -2
  52. package/plugins/runtime-modules/core/widgets/button/config.d.ts +0 -1
  53. package/plugins/runtime-modules/core/widgets/button/config.js +0 -1
  54. package/plugins/runtime-modules/core/widgets/button/plugin.js +6 -25
  55. package/plugins/runtime-modules/core/widgets/card/config.d.ts +24 -2
  56. package/plugins/runtime-modules/core/widgets/card/config.js +35 -3
  57. package/plugins/runtime-modules/core/widgets/card/editor.js +2 -0
  58. package/plugins/runtime-modules/core/widgets/card/plugin.js +8 -10
  59. package/plugins/runtime-modules/core/widgets/card/server.d.ts +1 -2
  60. package/plugins/runtime-modules/core/widgets/card/server.js +18 -28
  61. package/plugins/runtime-modules/core/widgets/cascader/authoring.d.ts +1 -0
  62. package/plugins/runtime-modules/core/widgets/checkbox-group/config.d.ts +7 -1
  63. package/plugins/runtime-modules/core/widgets/checkbox-group/config.js +1 -1
  64. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -0
  65. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -1
  66. package/plugins/runtime-modules/core/widgets/entry-list/config.js +0 -1
  67. package/plugins/runtime-modules/core/widgets/entry-list/plugin.js +1 -3
  68. package/plugins/runtime-modules/core/widgets/entry-list/server.d.ts +1 -3
  69. package/plugins/runtime-modules/core/widgets/entry-list/server.js +3 -3
  70. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -0
  71. package/plugins/runtime-modules/core/widgets/image/server.js +5 -9
  72. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -0
  73. package/plugins/runtime-modules/core/widgets/markdown-toc/server.js +3 -5
  74. package/plugins/runtime-modules/core/widgets/quick-links/plugin.js +2 -4
  75. package/plugins/runtime-modules/core/widgets/quick-links/server.d.ts +2 -5
  76. package/plugins/runtime-modules/core/widgets/quick-links/server.js +2 -6
  77. package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -1
  78. package/plugins/runtime-modules/core/widgets/result/config.js +0 -1
  79. package/plugins/runtime-modules/core/widgets/result/plugin.js +2 -4
  80. package/plugins/runtime-modules/core/widgets/result/server.d.ts +2 -3
  81. package/plugins/runtime-modules/core/widgets/result/server.js +11 -33
  82. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -0
  83. package/plugins/runtime-modules/core/widgets/slider/config.d.ts +11 -0
  84. package/plugins/runtime-modules/core/widgets/slider/config.js +1 -1
  85. package/plugins/runtime-modules/core/widgets/slot-upload/config.d.ts +0 -1
  86. package/plugins/runtime-modules/core/widgets/slot-upload/config.js +0 -2
  87. package/plugins/runtime-modules/core/widgets/slot-upload/plugin.js +2 -4
  88. package/plugins/runtime-modules/core/widgets/slot-upload/server.d.ts +3 -4
  89. package/plugins/runtime-modules/core/widgets/slot-upload/server.js +5 -13
  90. package/plugins/runtime-modules/core/widgets/spacer/config.d.ts +1 -1
  91. package/plugins/runtime-modules/core/widgets/spacer/config.js +1 -1
  92. package/plugins/runtime-modules/core/widgets/steps/config.d.ts +7 -2
  93. package/plugins/runtime-modules/core/widgets/steps/config.js +1 -2
  94. package/plugins/runtime-modules/core/widgets/steps/plugin.js +6 -30
  95. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -0
  96. package/plugins/runtime-modules/core/widgets/table/config.js +1 -1
  97. package/plugins/runtime-modules/core/widgets/timeline/config.d.ts +8 -1
  98. package/plugins/runtime-modules/core/widgets/timeline/config.js +1 -2
  99. package/plugins/runtime-modules/core/widgets/timeline/plugin.js +6 -37
  100. package/plugins/runtime-modules/descriptor-compiler.d.ts +23 -3
  101. package/plugins/runtime-modules/descriptor-compiler.js +107 -12
  102. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +2 -0
  103. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +2 -0
  104. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +3 -0
  105. package/plugins/runtime-modules/page-preset-overlays.d.ts +18 -0
  106. package/plugins/runtime-modules/page-preset-overlays.js +70 -0
  107. package/plugins/runtime-modules/public/trees/phi-default-pub-welcome-page-tree.js +1 -0
  108. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +3 -0
  109. package/plugins/runtime-modules/search/widgets/search-box/server.js +3 -5
  110. package/plugins/runtime-modules/search/widgets/search-results/server.js +3 -5
  111. package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +4 -0
  112. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +2 -0
  113. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +2 -0
  114. package/server-helpers/cms-area.js +9 -1
  115. package/server-helpers/cms-request.js +49 -14
  116. package/server-helpers/cms-root.js +2 -0
  117. package/server-helpers/cms-widget-texts.d.ts +14 -0
  118. package/server-helpers/cms-widget-texts.js +117 -0
  119. package/server-helpers/module-folder-targets.d.ts +7 -0
  120. package/server-helpers/module-folder-targets.js +15 -0
  121. package/server-helpers/search-index.js +12 -3
  122. package/styles/root.css +6 -2
  123. package/types/cms-module-descriptors.d.ts +24 -0
  124. package/types/cms-plugins.d.ts +30 -5
  125. package/types/core-widget-placements.d.ts +5 -0
  126. package/types/module-media.d.ts +31 -0
  127. package/types/module-media.js +11 -0
  128. package/types/slot-size-policy.d.ts +19 -2
  129. package/types.d.ts +1 -0
@@ -8,7 +8,7 @@ import { readPhiMediaImageSourceConfig } from "../../../../../components/widgets
8
8
  import { PHI_SURFACE_CARD } from "../../../../../helpers/surface-presets";
9
9
  import { normalizePhiBackgroundWidgetConfig } from "../../../../../components/widgets/config/background";
10
10
  import { buildPhiBulletListFields, readPhiBulletListEntries, readPhiBulletListStyle, } from "../../../../../components/widgets/shared/bullet-list-vocabulary";
11
- import { PHI_CARD_HEADING_LEVELS, PHI_CARD_HOVER_EFFECTS, PHI_CARD_ICON_PLACEMENTS, PHI_CARD_TEXT_ALIGNS, PHI_CARD_BADGE_STYLES, PHI_CARD_MEDIA_ASPECT_RATIOS, PHI_CARD_VARIANTS, readPhiCardBillingPeriod, } from "../../../../../components/widgets/shared/card-vocabulary";
11
+ import { PHI_CARD_HEADING_LEVELS, PHI_CARD_HOVER_EFFECTS, PHI_CARD_ICON_PLACEMENTS, PHI_CARD_ICON_SIZES, PHI_CARD_TEXT_ALIGNS, PHI_CARD_BADGE_STYLES, PHI_CARD_MEDIA_ASPECT_RATIOS, PHI_CARD_VARIANTS, readPhiCardBillingPeriod, } from "../../../../../components/widgets/shared/card-vocabulary";
12
12
  import { readPhiControlLabel } from "../../../../../components/widgets/config/common-action-field";
13
13
  import { PHI_CARD_SIGNALS } from "../../../../../components/widgets/signals/control-signal-capabilities";
14
14
  import { readPhiSignalRouteSet } from "../../../../../types/signals";
@@ -51,6 +51,8 @@ function parsePhiCmsCardWidgetConfig(config) {
51
51
  iconPlacement: readChoice(readString(config.iconPlacement), PHI_CARD_ICON_PLACEMENTS),
52
52
  iconColor: readString(config.iconColor),
53
53
  iconBackground: readString(config.iconBackground),
54
+ iconSize: readChoice(readString(config.iconSize), PHI_CARD_ICON_SIZES),
55
+ iconFramed: readBoolean(config.iconFramed),
54
56
  alt: readString(config.alt),
55
57
  mediaAspectRatio: readChoice(readString(config.mediaAspectRatio), PHI_CARD_MEDIA_ASPECT_RATIOS),
56
58
  imageOpacity: readPhiCardImageOpacity(config.imageOpacity),
@@ -84,6 +86,8 @@ const PHI_CARD_DEFAULT_CONFIG = {
84
86
  headingLevel: "h3",
85
87
  textAlign: "start",
86
88
  badgeStyle: "none",
89
+ // Shown on in the Inspector; the reader treats an absent value as framed all the same.
90
+ iconFramed: true,
87
91
  };
88
92
  export const PHI_CARD_WIDGET_DEFINITION = {
89
93
  kind: "widget",
@@ -94,7 +98,22 @@ export const PHI_CARD_WIDGET_DEFINITION = {
94
98
  description: "Content card with a picture or an icon, a heading or a figure, and a link.",
95
99
  icon: "antd:idcard-outlined",
96
100
  iconFamily: "basic",
97
- translatesOwnText: true,
101
+ /*
102
+ * The card's words are written on the canvas, not in Inspector fields, so the card names them for the
103
+ * renderer's translation (TRANSLATIONS.md, "Widget config text"); a plan line's values stay out of it.
104
+ */
105
+ configTexts: [
106
+ { key: "eyebrow", register: "label" },
107
+ { key: "title", register: "label" },
108
+ { key: "description", register: "message" },
109
+ { key: "meta", register: "label" },
110
+ { key: "actionLabel", register: "label" },
111
+ { key: "badge", register: "label" },
112
+ { key: "pricePeriod", register: "label" },
113
+ { key: "pricePeriodYearly", register: "label" },
114
+ { key: "alt", register: "label" },
115
+ { key: "features", item: "text", values: "values", register: "message" },
116
+ ],
98
117
  /*
99
118
  * A card fills its slot both ways, as a Layout does.
100
119
  *
@@ -224,6 +243,18 @@ export const PHI_CARD_WIDGET_DEFINITION = {
224
243
  // Shown with an icon, and not under the Center variant, which puts it over the picture itself.
225
244
  visibleWhen: [{ field: "icon", notEquals: null }, { field: "variant", notEquals: "center" }],
226
245
  },
246
+ {
247
+ key: "iconSize",
248
+ type: "choice",
249
+ label: "Icon size",
250
+ options: [
251
+ { value: "default", label: "Default" },
252
+ { value: "large", label: "Large" },
253
+ { value: "xlarge", label: "Extra large" },
254
+ ],
255
+ visibleWhen: { field: "icon", notEquals: null },
256
+ },
257
+ { key: "iconFramed", type: "boolean", label: "Icon ground", visibleWhen: { field: "icon", notEquals: null } },
227
258
  /* Left empty, the Theme's: the secondary text colour on its quietest fill. */
228
259
  {
229
260
  key: "iconColor",
@@ -239,7 +270,8 @@ export const PHI_CARD_WIDGET_DEFINITION = {
239
270
  label: "Background",
240
271
  mode: "single",
241
272
  defaultToken: "colorFillQuaternary",
242
- visibleWhen: { field: "icon", notEquals: null },
273
+ // Without a ground there is nothing to colour.
274
+ visibleWhen: [{ field: "icon", notEquals: null }, { field: "iconFramed", notEquals: false }],
243
275
  },
244
276
  /*
245
277
  * Where the whole card leads, and how it answers the pointer: only a card that leads somewhere has
@@ -170,6 +170,8 @@ export function PhiCardWidgetEditor({ config, onChange }) {
170
170
  iconPlacement: config.iconPlacement,
171
171
  iconColor: config.iconColor,
172
172
  iconBackground: config.iconBackground,
173
+ iconSize: config.iconSize,
174
+ iconFramed: config.iconFramed,
173
175
  textAlign: config.textAlign,
174
176
  headingLevel: config.headingLevel,
175
177
  /*
@@ -1,7 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { PhiCmsFlags } from "../../../../../constants/phi-cms";
3
- import { hasPhiFlag } from "../../../../../helpers/flags";
4
- import { translatePhiSearchWidgetTexts } from "../../../../../server-helpers/search-text";
5
2
  import { PhiCardWidget } from "./server";
6
3
  import { PHI_CARD_WIDGET_DEFINITION, PHI_CARD_WIDGET_PLUGIN_TYPE } from "./config";
7
4
  function renderPhiCard({ widget, config, runtime, links }, preview) {
@@ -11,17 +8,17 @@ function renderPhiCard({ widget, config, runtime, links }, preview) {
11
8
  description: config.description,
12
9
  meta: config.meta,
13
10
  actionLabel: config.actionLabel,
14
- }, config: config, runtime: runtime, links: links, translate: !hasPhiFlag(widget.flags, PhiCmsFlags.NoTranslate), preview: preview }, `widget-${widget.id}`));
11
+ }, config: config, runtime: runtime, links: links, preview: preview }, `widget-${widget.id}`));
15
12
  }
16
13
  export const PHI_CARD_WIDGET_PLUGIN = {
17
14
  ...PHI_CARD_WIDGET_DEFINITION,
18
15
  /*
19
- * The card's words as the render draws them (SEARCH.md): the texts it translates, translated the same
20
- * way; the figure and the prices as written, which the render never translates either.
16
+ * The card's words as the render draws them (SEARCH.md): they arrive translated by the same pass the
17
+ * render's do; the figure and the prices as written, which the render never translates either.
21
18
  */
22
- searchText: async ({ widget, config, runtime }) => {
19
+ searchText: ({ config }) => {
23
20
  const plan = config.body === "plan";
24
- const translated = await translatePhiSearchWidgetTexts(runtime, [
21
+ return [
25
22
  config.eyebrow,
26
23
  config.title,
27
24
  config.description,
@@ -29,8 +26,9 @@ export const PHI_CARD_WIDGET_PLUGIN = {
29
26
  config.badge,
30
27
  config.actionEnabled ? config.actionLabel : undefined,
31
28
  ...(plan ? (config.features ?? []).map((entry) => entry.text) : []),
32
- ], { translate: !hasPhiFlag(widget.flags, PhiCmsFlags.NoTranslate) });
33
- return [...translated, config.value ?? "", ...(plan ? [config.price ?? "", config.priceYearly ?? ""] : [])];
29
+ config.value,
30
+ ...(plan ? [config.price, config.priceYearly] : []),
31
+ ].filter((text) => typeof text === "string" && text.trim().length > 0);
34
32
  },
35
33
  /*
36
34
  * Not the passive renderers' preview: that one is inert, and an inert card answers no pointer, so its
@@ -14,8 +14,7 @@ export type PhiCardWidgetLabels = {
14
14
  export type PhiCardWidgetProps = PhiServerBlockBaseProps<PhiCardWidgetLabels, PhiCmsCardWidgetConfig> & {
15
15
  links?: PhiResolvedLinkTargets | null;
16
16
  };
17
- export declare function PhiCardWidget({ labels, config, runtime, links, translate, preview, }: PhiCardWidgetProps & {
18
- translate: boolean;
17
+ export declare function PhiCardWidget({ labels, config, runtime, links, preview, }: PhiCardWidgetProps & {
19
18
  /**
20
19
  * The Builder's preview: the card answers the pointer as it will live -- its hover effect is what the
21
20
  * author is looking at -- but leads nowhere and says nothing, so a click cannot leave the Builder.
@@ -10,8 +10,7 @@ import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runt
10
10
  import { getPhiCardWidgetLabelsForRuntime } from "../../../../../components/widgets/label-sets/card";
11
11
  import { PhiBulletListControl } from "../../../../../components/controls/phi-bullet-list-control";
12
12
  import { buildPhiBulletListTree, resolvePhiBulletListStyle, } from "../../../../../components/widgets/shared/bullet-list-vocabulary";
13
- import { maskPhiTextPlaceholders, resolvePhiTextPlaceholders } from "../../../../../helpers/text-placeholders";
14
- export async function PhiCardWidget({ labels, config, runtime, links, translate, preview = false, }) {
13
+ export async function PhiCardWidget({ labels, config, runtime, links, preview = false, }) {
15
14
  /*
16
15
  * The button's words: the author's, or none where they emptied them for an icon-only button, or the
17
16
  * label set's when they never wrote any -- which is translated there, not here.
@@ -24,7 +23,17 @@ export async function PhiCardWidget({ labels, config, runtime, links, translate,
24
23
  const resolvedAsset = config?.sourceKind === "asset" && typeof config.assetId === "number"
25
24
  ? await resolvePhiPublicAssetReference({ runtime, assetId: config.assetId }).catch(() => null)
26
25
  : null;
27
- const textEntries = [
26
+ /*
27
+ * The card's own words arrive translated, `{site.name}` and a plan line's values filled in
28
+ * (server-helpers/cms-widget-texts.ts, the Card's `configTexts`). Only the Media library's
29
+ * description of an Asset is read here, and translated in the Site's store like every Asset's.
30
+ */
31
+ const ownAlt = config?.alt?.trim();
32
+ const assetAlt = !ownAlt ? resolvedAsset?.altText?.trim() : undefined;
33
+ const alt = ownAlt || (assetAlt
34
+ ? (await (runtime?.locale.current ? trBulkForLocale(runtime.locale.current, [assetAlt]) : trBulk([assetAlt])))[0]?.trim() || assetAlt
35
+ : undefined);
36
+ const translatedByKey = new Map([
28
37
  ["eyebrow", labels.eyebrow ?? config?.eyebrow],
29
38
  ["title", labels.title ?? config?.title],
30
39
  ["description", labels.description ?? config?.description],
@@ -33,33 +42,12 @@ export async function PhiCardWidget({ labels, config, runtime, links, translate,
33
42
  ["badge", labels.badge ?? config?.badge],
34
43
  ["pricePeriod", plan ? labels.pricePeriod ?? config?.pricePeriod : undefined],
35
44
  ["pricePeriodYearly", plan ? labels.pricePeriodYearly ?? config?.pricePeriodYearly : undefined],
36
- // What a screen reader says for the picture, in the page's language like every other word here.
37
- ["alt", (config?.alt ?? resolvedAsset?.altText ?? "").trim() || undefined],
38
- ];
39
- /*
40
- * A plan's features, masked as every list entry is: their values stand as `%1` onwards and never reach
41
- * a translator, and `{site.name}` is filled after (`helpers/text-placeholders.ts`).
42
- */
43
- const features = plan ? (config?.features ?? []).filter((entry) => Boolean(entry.text)) : [];
44
- const maskedFeatures = features.map((entry) => maskPhiTextPlaceholders(entry.text, entry.values?.length ?? 0));
45
- const sourceTexts = [...textEntries.map(([, value]) => value ?? ""), ...maskedFeatures.map((masked) => masked.text)];
46
- const translatedTexts = translate
47
- ? await (runtime?.locale.current
48
- ? trBulkForLocale(runtime.locale.current, sourceTexts)
49
- : trBulk(sourceTexts))
50
- : sourceTexts;
51
- const translatedByKey = new Map(textEntries.map(([key], index) => [key, translatedTexts[index] || undefined]));
52
- const translatedFeatures = features.map((entry, index) => ({
53
- ...entry,
54
- text: resolvePhiTextPlaceholders(translatedTexts[textEntries.length + index] ?? entry.text, maskedFeatures[index].names, runtime, entry.values),
55
- }));
45
+ ["alt", alt],
46
+ ]);
47
+ const translatedFeatures = plan ? (config?.features ?? []).filter((entry) => Boolean(entry.text)) : [];
56
48
  /* Drawn here, so the list Control never reaches the browser with the Card (`listContent`). */
57
49
  const featureList = translatedFeatures.length > 0 ? (_jsx(PhiBulletListControl, { listStyle: resolvePhiBulletListStyle(config?.featureList), items: buildPhiBulletListTree(translatedFeatures, (entry) => entry.text) })) : null;
58
- /*
59
- * The figure is left out of the translation on purpose: a Site's own number is not a word, and
60
- * `translate` is a per-Widget switch, so a stat card that turned it off to protect the figure would
61
- * lose its title's translation with it.
62
- */
50
+ // The figure is not translated: a Site's own number is not a word (`value` is no text field).
63
51
  const value = config?.value;
64
52
  const presentation = resolvePhiImagePresentation({
65
53
  sourceKind: config?.sourceKind,
@@ -105,6 +93,8 @@ export async function PhiCardWidget({ labels, config, runtime, links, translate,
105
93
  iconPlacement: config?.iconPlacement,
106
94
  iconColor: config?.iconColor,
107
95
  iconBackground: config?.iconBackground,
96
+ iconSize: config?.iconSize,
97
+ iconFramed: config?.iconFramed,
108
98
  textAlign: config?.textAlign,
109
99
  headingLevel: config?.headingLevel,
110
100
  href: link?.href,
@@ -20,6 +20,7 @@ export declare const PHI_CASCADER_WIDGET_BUILDER_PLUGIN: {
20
20
  requiredDataProviders?: readonly import("@phis/contracts/controls").PhiRuntimeDataProviderKey[] | undefined;
21
21
  contentBinding?: (import("../../../../../types").PhiCmsWidgetContentBinding | null) | undefined;
22
22
  translatesOwnText?: true | undefined;
23
+ configTexts?: readonly import("../../../../../types/cms-plugins").PhiCmsWidgetConfigText[] | undefined;
23
24
  slotSizePolicy: import("../../../../../types").PhiSlotSizePolicy;
24
25
  requiredRegionOwnership?: import("../../../../../helpers/cms-region-keys").PhiCmsRegionOwnership | undefined;
25
26
  creationConfig?: Partial<PhiCascaderWidgetConfig> | undefined;
@@ -14,7 +14,13 @@ export declare const PHI_CHECKBOX_GROUP_WIDGET_DEFINITION: {
14
14
  kind: "widget";
15
15
  pluginKey: string;
16
16
  typeKey: string;
17
- slotSizePolicy: "intrinsic";
17
+ slotSizePolicy: {
18
+ configField: string;
19
+ byValue: {
20
+ true: "intrinsic";
21
+ };
22
+ otherwise: "fill-inline";
23
+ };
18
24
  title: string;
19
25
  description: string;
20
26
  category: "form";
@@ -18,7 +18,7 @@ export const PHI_CHECKBOX_GROUP_WIDGET_DEFINITION = {
18
18
  kind: "widget",
19
19
  pluginKey: resolvePhiCmsWidgetPluginKey("checkbox-group"),
20
20
  typeKey: "checkbox-group",
21
- slotSizePolicy: "intrinsic",
21
+ slotSizePolicy: { configField: "vertical", byValue: { true: "intrinsic" }, otherwise: "fill-inline" },
22
22
  title: "Checkbox Group",
23
23
  description: "Reusable multi-choice checkbox group with static or provider-backed options.",
24
24
  category: "form",
@@ -40,6 +40,7 @@ export declare const PHI_DESCRIPTION_WIDGET_DEFINITION: {
40
40
  type: "string" | "url" | "icon";
41
41
  emptyValue?: "";
42
42
  placeholder?: string;
43
+ text?: false | "label" | "message";
43
44
  }) | ({
44
45
  key: string;
45
46
  label: string;
@@ -69,7 +69,6 @@ export declare const PHI_ENTRY_LIST_WIDGET_DEFINITION: {
69
69
  description: string;
70
70
  category: "content";
71
71
  tags: string[];
72
- translatesOwnText: true;
73
72
  icon: string;
74
73
  slotSizePolicy: "fill-inline";
75
74
  fields: (({
@@ -84,6 +83,7 @@ export declare const PHI_ENTRY_LIST_WIDGET_DEFINITION: {
84
83
  type: "string" | "url" | "icon";
85
84
  emptyValue?: "";
86
85
  placeholder?: string;
86
+ text?: false | "label" | "message";
87
87
  }) | ({
88
88
  key: string;
89
89
  label: string;
@@ -85,7 +85,6 @@ export const PHI_ENTRY_LIST_WIDGET_DEFINITION = {
85
85
  category: "content",
86
86
  tags: ["news", "blog", "content", "list"],
87
87
  // The heading is the Site's own words; the entries arrive translated from Core.
88
- translatesOwnText: true,
89
88
  icon: "antd:read",
90
89
  slotSizePolicy: "fill-inline",
91
90
  fields: [
@@ -1,11 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { PhiCmsFlags } from "../../../../../constants/phi-cms";
3
- import { hasPhiFlag } from "../../../../../helpers/flags";
4
2
  import { definePhiPassiveWidgetRenderers } from "../../../../../plugins/factories/widget-renderers";
5
3
  import { PHI_ENTRY_LIST_WIDGET_DEFINITION } from "./config";
6
4
  import { PhiEntryListWidget } from "./server";
7
5
  export const PHI_ENTRY_LIST_WIDGET_PLUGIN = {
8
6
  ...PHI_ENTRY_LIST_WIDGET_DEFINITION,
9
7
  // `links` carries the detail route, resolved with every other target of the page before anything drew.
10
- ...definePhiPassiveWidgetRenderers(({ widget, config, runtime, registry, links }) => (_jsx(PhiEntryListWidget, { config: config, runtime: runtime, registry: registry, links: links, translate: !hasPhiFlag(widget.flags, PhiCmsFlags.NoTranslate), widgetId: widget.id }, `widget-${widget.id}`))),
8
+ ...definePhiPassiveWidgetRenderers(({ widget, config, runtime, registry, links }) => (_jsx(PhiEntryListWidget, { config: config, runtime: runtime, registry: registry, links: links, widgetId: widget.id }, `widget-${widget.id}`))),
11
9
  };
@@ -7,8 +7,6 @@ export type PhiEntryListWidgetProps = PhiServerBlockBaseProps<PhiNoLabels, PhiEn
7
7
  /** Where the record binding is answered; absent outside a page render, where nothing is bound. */
8
8
  registry?: Pick<PhiCmsRuntimeRenderRegistry, "recordProviderLoadersByKey">;
9
9
  links?: PhiResolvedLinkTargets | null;
10
- /** Whether the heading is translated: the node's `NoTranslate` flag, read by the plugin. */
11
- translate?: boolean;
12
10
  widgetId?: PhiCmsInstanceId | null;
13
11
  };
14
12
  /**
@@ -27,4 +25,4 @@ export type PhiEntryListWidgetProps = PhiServerBlockBaseProps<PhiNoLabels, PhiEn
27
25
  * as that record carries. And with nothing related -- or nothing to be related to -- it draws
28
26
  * nothing at all: a "more like this" heading over an empty space says something false.
29
27
  */
30
- export declare function PhiEntryListWidget({ config, runtime, registry, links, translate, widgetId, }: PhiEntryListWidgetProps): Promise<import("react").JSX.Element | null>;
28
+ export declare function PhiEntryListWidget({ config, runtime, registry, links, widgetId, }: PhiEntryListWidgetProps): Promise<import("react").JSX.Element | null>;
@@ -5,7 +5,6 @@ import { PhiWidgetFailureServer } from "../../../../../components/widgets/shared
5
5
  import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
6
6
  import { fetchPhiSiteContentEntries } from "../../../../../gateway/content-entries";
7
7
  import { phiRuntime } from "../../../../../server-helpers/phi-runtime";
8
- import { trBulkForLocale } from "../../../../../server-helpers/translate";
9
8
  import { readPhiRuntimeTreeRenderMode } from "../../../render-mode";
10
9
  import { readPhiBoundContentEntry } from "../../content-entries/record-source.server";
11
10
  import { buildPhiEntryViews } from "./view.server";
@@ -27,7 +26,7 @@ import { pickPhiSequenceSettings } from "../../../../../components/widgets/confi
27
26
  * as that record carries. And with nothing related -- or nothing to be related to -- it draws
28
27
  * nothing at all: a "more like this" heading over an empty space says something false.
29
28
  */
30
- export async function PhiEntryListWidget({ config, runtime, registry, links, translate = true, widgetId, }) {
29
+ export async function PhiEntryListWidget({ config, runtime, registry, links, widgetId, }) {
31
30
  const settings = normalizePhiEntryListWidgetConfig(config);
32
31
  const renderMode = readPhiRuntimeTreeRenderMode(config ?? {});
33
32
  const rt = phiRuntime(runtime);
@@ -81,7 +80,8 @@ export async function PhiEntryListWidget({ config, runtime, registry, links, tra
81
80
  // A stacked entry's title is an `h2`; its text's headings start under it.
82
81
  headingOffset: 2,
83
82
  });
84
- const [title] = settings.title && translate ? await trBulkForLocale(locale, [settings.title]) : [settings.title];
83
+ // The heading arrives translated (server-helpers/cms-widget-texts.ts).
84
+ const title = settings.title;
85
85
  return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.EntryList, componentProps: {
86
86
  entries: views,
87
87
  labels,
@@ -53,6 +53,7 @@ export declare const PHI_GALLERY_WIDGET_DEFINITION: {
53
53
  type: "string" | "url" | "icon";
54
54
  emptyValue?: "";
55
55
  placeholder?: string;
56
+ text?: false | "label" | "message";
56
57
  }) | ({
57
58
  key: string;
58
59
  label: string;
@@ -21,18 +21,16 @@ export async function PhiImageWidgetServer({ runtime, widget, config, translate:
21
21
  /*
22
22
  * The picture's description and title in the page's language, as every other Widget's words.
23
23
  *
24
- * A Content record's text arrives translated already and is taken as it is. The rest -- the Asset's own
25
- * description from the Media library, or what the Widget's config states for an address -- is the Site's
26
- * text and goes through the Site's translation, unless the Widget says not to translate.
24
+ * A Content record's text arrives translated already and is taken as it is, and so does what the
25
+ * Widget's config states for an address (server-helpers/cms-widget-texts.ts). The Asset's own
26
+ * description from the Media library is the Site's text and goes through the Site's translation.
27
27
  */
28
28
  const translate = translateWords ?? !hasPhiFlag(widget?.flags ?? 0, PhiCmsFlags.NoTranslate);
29
29
  const sourceTexts = [
30
30
  recordAlt ? "" : (resolvedAsset?.altText ?? "").trim(),
31
31
  recordTitle ? "" : (resolvedAsset?.title ?? "").trim(),
32
- config?.sourceKind === "asset" ? "" : (config?.alt ?? "").trim(),
33
- config?.sourceKind === "asset" ? "" : (config?.title ?? "").trim(),
34
32
  ];
35
- const [assetAlt, assetTitle, configAlt, configTitle] = translate && sourceTexts.some(Boolean)
33
+ const [assetAlt, assetTitle] = translate && sourceTexts.some(Boolean)
36
34
  ? await (runtime.locale.current ? trBulkForLocale(runtime.locale.current, sourceTexts) : trBulk(sourceTexts))
37
35
  : sourceTexts;
38
36
  const contentResolvedAsset = resolvedAsset
@@ -42,9 +40,7 @@ export async function PhiImageWidgetServer({ runtime, widget, config, translate:
42
40
  altText: recordAlt || assetAlt || resolvedAsset.altText,
43
41
  }
44
42
  : null;
45
- const translatedConfig = config && config.sourceKind !== "asset"
46
- ? { ...config, ...(configAlt ? { alt: configAlt } : {}), ...(configTitle ? { title: configTitle } : {}) }
47
- : config;
43
+ const translatedConfig = config;
48
44
  return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.Image, componentProps: {
49
45
  labels,
50
46
  config: translatedConfig ?? undefined,
@@ -100,6 +100,7 @@ export declare const PHI_MARKDOWN_WIDGET_DEFINITION: {
100
100
  type: "string" | "url" | "icon";
101
101
  emptyValue?: "";
102
102
  placeholder?: string;
103
+ text?: false | "label" | "message";
103
104
  }) | ({
104
105
  key: string;
105
106
  label: string;
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { PhiCmsFlags } from "../../../../../constants/phi-cms";
3
3
  import { hasPhiFlag } from "../../../../../helpers/flags";
4
- import { trForLocale } from "../../../../../server-helpers/translate";
5
4
  import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
6
5
  import { parsePhiCmsMarkdownWidgetConfig } from "../markdown/config";
7
6
  import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runtime/runtime-module-render-client-manifest";
@@ -26,11 +25,10 @@ function filterHeadings(headings, config) {
26
25
  }
27
26
  export async function PhiMarkdownTocWidget({ config, defaultLabels, tree, runtime, }) {
28
27
  /*
29
- * The author's title in the render's locale; the default is a label set's and arrives translated, so
30
- * asking for it again would hand a translator text that is no longer in the source language.
28
+ * The author's title arrives translated (server-helpers/cms-widget-texts.ts); the default is a label
29
+ * set's and arrives translated too.
31
30
  */
32
- const ownTitle = config?.title?.trim();
33
- const title = ownTitle ? await trForLocale(runtime.locale.current, ownTitle) : defaultLabels.title;
31
+ const title = config?.title?.trim() || defaultLabels.title;
34
32
  const targetWidget = resolveTargetMarkdownWidget(tree, config);
35
33
  if (!targetWidget) {
36
34
  return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.MarkdownToc, componentProps: { config: { ...config, title, headings: [] } } }));
@@ -1,11 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { PhiCmsFlags } from "../../../../../constants/phi-cms";
3
- import { hasPhiFlag } from "../../../../../helpers/flags";
4
2
  import { PhiQuickLinksWidget } from "./server";
5
3
  import { PHI_QUICK_LINKS_WIDGET_DEFINITION, PHI_QUICK_LINKS_WIDGET_PLUGIN_TYPE, } from "./config";
6
4
  export const PHI_QUICK_LINKS_WIDGET_PLUGIN = {
7
5
  ...PHI_QUICK_LINKS_WIDGET_DEFINITION,
8
- render: ({ widget, runtime, config }) => (_jsx(PhiQuickLinksWidget, { runtime: runtime, navKey: config.navKey, title: config.title, textSource: config.textSource, translate: !hasPhiFlag(widget.flags, PhiCmsFlags.NoTranslate), columns: config.columns, separator: config.separator }, `widget-${widget.id}`)),
9
- renderPreview: ({ widget, runtime, config }) => (_jsx(PhiQuickLinksWidget, { runtime: runtime, navKey: config.navKey, title: config.title, textSource: config.textSource, translate: !hasPhiFlag(widget.flags, PhiCmsFlags.NoTranslate), columns: config.columns, separator: config.separator, interactive: false }, `widget-${widget.id}`)),
6
+ render: ({ widget, runtime, config }) => (_jsx(PhiQuickLinksWidget, { runtime: runtime, navKey: config.navKey, title: config.title, columns: config.columns, separator: config.separator }, `widget-${widget.id}`)),
7
+ renderPreview: ({ widget, runtime, config }) => (_jsx(PhiQuickLinksWidget, { runtime: runtime, navKey: config.navKey, title: config.title, columns: config.columns, separator: config.separator, interactive: false }, `widget-${widget.id}`)),
10
8
  };
11
9
  export { PHI_QUICK_LINKS_WIDGET_PLUGIN_TYPE };
@@ -1,14 +1,11 @@
1
1
  import type { PhiBlockRuntime } from "../../../../../types";
2
- import type { PhiTextSource } from "../../../../../helpers/text-source";
3
2
  export type PhiQuickLinksWidgetProps = {
4
3
  runtime: Pick<PhiBlockRuntime, "site" | "locale" | "area" | "viewer" | "request">;
5
4
  navKey?: string;
5
+ /** In the reader's language already: a Widget's arrives translated (server-helpers/cms-widget-texts.ts). */
6
6
  title?: string;
7
- /** Whose words the title is, which decides the store that translates it. */
8
- textSource?: PhiTextSource;
9
- translate?: boolean;
10
7
  columns?: 1 | 2 | 3;
11
8
  separator?: boolean;
12
9
  interactive?: boolean;
13
10
  };
14
- export declare function PhiQuickLinksWidget({ runtime, navKey, title, textSource, translate, columns, separator, interactive, }: PhiQuickLinksWidgetProps): Promise<import("react").JSX.Element | null>;
11
+ export declare function PhiQuickLinksWidget({ runtime, navKey, title, columns, separator, interactive, }: PhiQuickLinksWidgetProps): Promise<import("react").JSX.Element | null>;
@@ -3,18 +3,14 @@ import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
3
3
  import { PhiRuntimeModuleRenderClientHost } from "../../../../../components/runtime/runtime-module-render-client-manifest";
4
4
  import { resolvePhiNavigationItems } from "../../../../../components/widgets/server/navigation-request";
5
5
  import { mapPhiNavItemsToQuickLinksItems } from "./items";
6
- import { trWidgetText } from "../../../../../server-helpers/translate";
7
- export async function PhiQuickLinksWidget({ runtime, navKey, title, textSource, translate = true, columns = 2, separator = true, interactive = true, }) {
6
+ export async function PhiQuickLinksWidget({ runtime, navKey, title, columns = 2, separator = true, interactive = true, }) {
8
7
  const resolvedNavKey = navKey?.trim() ||
9
8
  `${runtime.area}:footer`;
10
9
  const resolvedNavigationItems = (await resolvePhiNavigationItems(runtime, resolvedNavKey)) ?? [];
11
10
  if (resolvedNavigationItems.length === 0) {
12
11
  return null;
13
12
  }
14
- const ownTitle = title?.trim();
15
- const labels = {
16
- title: ownTitle && translate ? await trWidgetText(runtime.locale.current, ownTitle, textSource) : title,
17
- };
13
+ const labels = { title };
18
14
  const config = {
19
15
  columns,
20
16
  separator,
@@ -35,7 +35,6 @@ export declare const PHI_RESULT_WIDGET_DEFINITION: {
35
35
  category: "content";
36
36
  description: string;
37
37
  iconFamily: string;
38
- translatesOwnText: true;
39
38
  slotSizePolicy: "intrinsic";
40
39
  fields: (({
41
40
  key: string;
@@ -49,6 +48,7 @@ export declare const PHI_RESULT_WIDGET_DEFINITION: {
49
48
  type: "string" | "url" | "icon";
50
49
  emptyValue?: "";
51
50
  placeholder?: string;
51
+ text?: false | "label" | "message";
52
52
  }) | ({
53
53
  key: string;
54
54
  label: string;
@@ -52,7 +52,6 @@ export const PHI_RESULT_WIDGET_DEFINITION = {
52
52
  * moves nothing. A Result that ends a page still fills one -- by being put in a slot that is that
53
53
  * wide, which is the layout's business rather than the widget's.
54
54
  */
55
- translatesOwnText: true,
56
55
  slotSizePolicy: "intrinsic",
57
56
  fields: [
58
57
  ...PHI_RENDERABLE_BLOCK_GEOMETRY_FIELDS,
@@ -1,13 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { PhiCmsFlags } from "../../../../../constants/phi-cms";
3
- import { hasPhiFlag } from "../../../../../helpers/flags";
4
2
  import { PHI_RESULT_WIDGET_DEFINITION, } from "./config";
5
3
  import { PhiResultWidget } from "./server";
6
4
  export const PHI_RESULT_WIDGET_PLUGIN = {
7
5
  ...PHI_RESULT_WIDGET_DEFINITION,
8
- render: ({ widget, config, runtime }) => (_jsx(PhiResultWidget, { config: config, runtime: runtime, translate: !hasPhiFlag(widget.flags, PhiCmsFlags.NoTranslate) }, `widget-${widget.id}`)),
6
+ render: ({ widget, config, runtime }) => (_jsx(PhiResultWidget, { config: config, runtime: runtime }, `widget-${widget.id}`)),
9
7
  renderPreview: ({ widget, config, runtime }) => (_jsx(PhiResultWidget, { config: {
10
8
  ...config,
11
9
  renderMode: "preview",
12
- }, runtime: runtime, translate: false }, `widget-preview-${widget.id}`)),
10
+ }, runtime: runtime }, `widget-preview-${widget.id}`)),
13
11
  };
@@ -1,9 +1,8 @@
1
1
  import type { PhiBlockRuntime } from "../../../../../types";
2
2
  import { type PhiCmsResultWidgetConfig } from "./config";
3
3
  export type PhiResultWidgetProps = {
4
+ /** Its own words arrive translated (server-helpers/cms-widget-texts.ts). */
4
5
  config?: PhiCmsResultWidgetConfig;
5
6
  runtime: PhiBlockRuntime;
6
- /** Whether the Widget's own text is translated, which the node's `NoTranslate` flag turns off. */
7
- translate: boolean;
8
7
  };
9
- export declare function PhiResultWidget({ config, runtime, translate }: PhiResultWidgetProps): Promise<import("react").JSX.Element>;
8
+ export declare function PhiResultWidget({ config, runtime }: PhiResultWidgetProps): Promise<import("react").JSX.Element>;
@@ -5,43 +5,21 @@ import { PHI_RESULT_HOME_LINK_SOURCE_LABEL } from "./config";
5
5
  import { localizeAreaPath } from "../../../../../helpers/locale";
6
6
  import { PhiResultWidgetBody } from "../../../../../components/widgets/shared/result-body";
7
7
  /**
8
- * The Result's words, each from the store of whoever wrote it (`helpers/text-source.ts`).
9
- *
10
- * A Preset's title and subtitle -- the error pages' "Not found" -- are the platform's and come from the
11
- * global store; an author's are the Site's. The home link's default label is the Widget's own sentence,
12
- * so it is the platform's whoever placed the Widget.
8
+ * The home link's label where nobody wrote one: the Widget's own sentence, so the platform's whoever
9
+ * placed the Widget, and translated from the global store.
13
10
  */
14
- async function resolveResultText({ config, runtime, translate }) {
11
+ async function resolveResultHomeLinkLabel(config, runtime) {
12
+ const authored = config?.homeLinkLabel?.trim();
13
+ if (authored)
14
+ return authored;
15
+ const translated = await trWidgetText(runtime.locale.current, PHI_RESULT_HOME_LINK_SOURCE_LABEL, PHI_TEXT_SOURCE_PRESET);
16
+ return translated.trim() || PHI_RESULT_HOME_LINK_SOURCE_LABEL;
17
+ }
18
+ export async function PhiResultWidget({ config, runtime }) {
15
19
  const code = config?.code?.trim();
16
20
  const title = config?.title?.trim();
17
21
  const subTitle = config?.subTitle?.trim();
18
- const authoredHomeLinkLabel = config?.homeLinkLabel?.trim();
19
- const homeLinkLabel = authoredHomeLinkLabel || PHI_RESULT_HOME_LINK_SOURCE_LABEL;
20
- const shouldTranslate = translate &&
21
- config?.renderMode !== "preview" &&
22
- config?.renderMode !== "editor";
23
- if (!shouldTranslate) {
24
- return { code, title, subTitle, homeLinkLabel };
25
- }
26
- const locale = runtime.locale.current;
27
- const textSource = config?.textSource;
28
- const translateText = async (value) => value ? (await trWidgetText(locale, value, textSource)).trim() || value : value;
29
- const [translatedTitle, translatedSubTitle, translatedHomeLinkLabel] = await Promise.all([
30
- translateText(title),
31
- translateText(subTitle),
32
- authoredHomeLinkLabel
33
- ? translateText(authoredHomeLinkLabel)
34
- : trWidgetText(locale, PHI_RESULT_HOME_LINK_SOURCE_LABEL, PHI_TEXT_SOURCE_PRESET),
35
- ]);
36
- return {
37
- code,
38
- title: translatedTitle,
39
- subTitle: translatedSubTitle,
40
- homeLinkLabel: translatedHomeLinkLabel?.trim() || homeLinkLabel,
41
- };
42
- }
43
- export async function PhiResultWidget({ config, runtime, translate }) {
44
- const { code, title, subTitle, homeLinkLabel } = await resolveResultText({ config, runtime, translate });
22
+ const homeLinkLabel = await resolveResultHomeLinkLabel(config, runtime);
45
23
  /*
46
24
  * Resolved here rather than configured: the root of the Area this result was rendered in, in the
47
25
  * locale it was rendered for. `localizeAreaPath` is the same answer the navigation gives.
@@ -58,6 +58,7 @@ export declare const PHI_SIMPLE_TEXT_WIDGET_DEFINITION: {
58
58
  type: "string" | "url" | "icon";
59
59
  emptyValue?: "";
60
60
  placeholder?: string;
61
+ text?: false | "label" | "message";
61
62
  }) | ({
62
63
  key: string;
63
64
  label: string;