@phis/ui 0.4.21 → 0.4.22

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 (99) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +1 -1
  2. package/components/controls/phi-brand-control.d.ts +4 -1
  3. package/components/controls/phi-brand-control.js +10 -6
  4. package/components/controls/phi-cascader-control.js +6 -1
  5. package/components/controls/phi-geometry-control.d.ts +33 -1
  6. package/components/controls/phi-geometry-control.js +87 -29
  7. package/components/controls/phi-series-chart-control.js +4 -2
  8. package/components/forms/form-provider-contract.d.ts +1 -0
  9. package/components/forms/form-provider-contract.js +1 -0
  10. package/components/forms/upload-form-control.js +1 -0
  11. package/components/layouts/clients/phi-flex-layout-client.js +23 -5
  12. package/components/layouts/clients/phi-grid-layout-client.js +20 -10
  13. package/components/layouts/clients/phi-layout-anchored-overlay.d.ts +2 -0
  14. package/components/layouts/clients/phi-layout-anchored-overlay.js +9 -2
  15. package/components/layouts/clients/phi-three-column-layout-client.js +7 -4
  16. package/components/layouts/layout-definitions.d.ts +16 -16
  17. package/components/layouts/layout-definitions.js +8 -8
  18. package/components/layouts/phi-base-layout.js +13 -9
  19. package/components/layouts/phi-layout-contract.d.ts +12 -2
  20. package/components/layouts/phi-layout-contract.js +30 -7
  21. package/components/layouts/phi-masonry-layout.d.ts +6 -0
  22. package/components/layouts/phi-masonry-layout.js +13 -3
  23. package/components/layouts/plugins/masonry-layout-plugin.js +2 -1
  24. package/components/media/asset-collection-runtime.d.ts +1 -6
  25. package/components/media/asset-collection-runtime.js +2 -93
  26. package/components/media/label-sets/media.js +12 -0
  27. package/components/media/media-folder-lock.d.ts +19 -0
  28. package/components/media/media-folder-lock.js +40 -0
  29. package/components/media/media-folder-options.d.ts +14 -2
  30. package/components/media/media-folder-options.js +17 -5
  31. package/components/media/media-widget-labels.d.ts +9 -0
  32. package/components/media/media-widget-labels.js +6 -0
  33. package/components/media/phi-area-upload-widget.js +1 -0
  34. package/components/media/phi-asset-folder-control.d.ts +14 -1
  35. package/components/media/phi-asset-folder-control.js +11 -4
  36. package/components/media/phi-image-preview-store.d.ts +0 -4
  37. package/components/media/phi-image-preview-store.js +0 -10
  38. package/components/media/phi-media-picker-binding.d.ts +7 -2
  39. package/components/media/phi-media-upload.d.ts +2 -0
  40. package/components/media/phi-media-upload.js +3 -0
  41. package/components/regions/clients/cms-region-container-client.d.ts +3 -1
  42. package/components/regions/clients/cms-region-container-client.js +4 -3
  43. package/components/regions/phi-cms-region-container.d.ts +3 -1
  44. package/components/regions/phi-cms-region-container.js +3 -2
  45. package/components/regions/phi-cms-region-shell.d.ts +9 -1
  46. package/components/regions/phi-cms-region-shell.js +3 -1
  47. package/components/regions/phi-cms-region-static.d.ts +3 -1
  48. package/components/regions/phi-cms-region-static.js +3 -2
  49. package/components/regions/presets/navigation-redirect.d.ts +2 -2
  50. package/components/regions/presets/navigation-redirect.js +5 -3
  51. package/components/shell/phi-antd-icon.d.ts +2 -0
  52. package/components/shell/phi-antd-icon.js +6 -0
  53. package/components/widgets/label-sets/geometry.js +10 -0
  54. package/components/widgets/label-types/geometry.d.ts +7 -0
  55. package/components/widgets/label-types/geometry.js +6 -0
  56. package/helpers/block-geometry-profiles.d.ts +67 -0
  57. package/helpers/block-geometry-profiles.js +105 -0
  58. package/helpers/cms-navigation-catalog.js +4 -2
  59. package/helpers/renderable-block-effects.js +16 -0
  60. package/package.json +1 -1
  61. package/plugins/runtime/phi-slot-child-frame-view.js +14 -4
  62. package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +42 -2
  63. package/plugins/runtime/slot-size-policy.d.ts +15 -0
  64. package/plugins/runtime/slot-size-policy.js +29 -0
  65. package/plugins/runtime-modules/asset/data-providers.js +3 -0
  66. package/plugins/runtime-modules/asset/services/collection.js +34 -0
  67. package/plugins/runtime-modules/asset/services/options.js +19 -2
  68. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +9 -0
  69. package/plugins/runtime-modules/auth/trees/phi-auth-runtime-page-tree.js +21 -17
  70. package/plugins/runtime-modules/avatar/widgets/account-avatar-picker/client.js +2 -0
  71. package/plugins/runtime-modules/builder/clients/region-inspector.js +1 -1
  72. package/plugins/runtime-modules/builder/render-root-node-preview.server.js +2 -1
  73. package/plugins/runtime-modules/builder/services/navigation-table.js +3 -2
  74. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +7 -1
  75. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +8 -2
  76. package/plugins/runtime-modules/core/messaging/data-providers.js +23 -0
  77. package/plugins/runtime-modules/core/messaging/labels.d.ts +2 -0
  78. package/plugins/runtime-modules/core/messaging/labels.js +8 -0
  79. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +32 -0
  80. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +31 -16
  81. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +52 -6
  82. package/plugins/runtime-modules/core/widgets/thread-conversation/client.d.ts +3 -0
  83. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +8 -2
  84. package/plugins/runtime-modules/descriptor-compiler.js +45 -2
  85. package/plugins/runtime-modules/public/trees/phi-default-pub-welcome-page-tree.js +8 -14
  86. package/plugins/runtime-modules/search/widgets/search-box/client.d.ts +2 -1
  87. package/plugins/runtime-modules/search/widgets/search-box/client.js +28 -6
  88. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +19 -2
  89. package/plugins/runtime-modules/threads/labels.d.ts +6 -0
  90. package/plugins/runtime-modules/threads/labels.js +16 -0
  91. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +24 -1
  92. package/styles/layout.css +101 -0
  93. package/styles/root.css +2 -1
  94. package/types/cms-config.d.ts +5 -1
  95. package/types/cms-config.js +1 -0
  96. package/types/cms-module-descriptors.d.ts +17 -0
  97. package/types/renderable-block.d.ts +5 -0
  98. package/types/site-theme.d.ts +9 -1
  99. package/types.d.ts +1 -1
@@ -0,0 +1,40 @@
1
+ import { PhiMediaFolderFlags } from "../../constants/media";
2
+ /*
3
+ * A locked Folder, as the media surfaces read it.
4
+ *
5
+ * Core enforces the lock: a locked Folder is not renamed, moved or deleted, and nothing is created in it,
6
+ * uploaded into it, moved into or out of it or deleted from it. Its one change is its flags, which is
7
+ * how it is unlocked again. These readers only keep the surfaces from offering what Core would refuse,
8
+ * and say why when it refuses anyway -- somebody else may have locked the Folder in the meantime.
9
+ */
10
+ /** The code Core answers a write that touches a locked Folder with (`409`). */
11
+ export const PHI_MEDIA_FOLDER_LOCKED_CODE = "media_folder_locked";
12
+ /**
13
+ * The reason the upload route gives for the same refusal. The upload path names its refusals in a
14
+ * vocabulary of its own (`readPhiMediaUploadErrorMessage`), and this is the word it uses for a lock.
15
+ */
16
+ export const PHI_MEDIA_UPLOAD_FOLDER_LOCKED_CODE = "folder_locked";
17
+ export function isPhiMediaFolderLocked(folder) {
18
+ return folder != null && (folder.flags & PhiMediaFolderFlags.Locked) !== 0;
19
+ }
20
+ /** Whether the Folder with this id is locked; the root and a Folder not in the list are not. */
21
+ export function isPhiMediaFolderIdLocked(folders, folderId) {
22
+ if (folderId == null)
23
+ return false;
24
+ return isPhiMediaFolderLocked(folders.find((folder) => folder.id === folderId));
25
+ }
26
+ /** The Folder's flags with the lock set or cleared, every other flag left as it was. */
27
+ export function writePhiMediaFolderLock(flags, locked) {
28
+ return locked ? flags | PhiMediaFolderFlags.Locked : flags & ~PhiMediaFolderFlags.Locked;
29
+ }
30
+ /** A refusal because a Folder is locked, carried with Core's code so a surface can read it as one. */
31
+ export class PhiMediaFolderLockedError extends Error {
32
+ code = PHI_MEDIA_FOLDER_LOCKED_CODE;
33
+ constructor(message = "The Media Folder is locked.") {
34
+ super(message);
35
+ this.name = "PhiMediaFolderLockedError";
36
+ }
37
+ }
38
+ export function isPhiMediaFolderLockedError(error) {
39
+ return error?.code === PHI_MEDIA_FOLDER_LOCKED_CODE;
40
+ }
@@ -12,9 +12,21 @@ export declare function buildPhiMediaFolderPathById(folders: PhiMediaAssetFolder
12
12
  /** The names of the folders from the root down to `folderId`, read like `buildPhiMediaFolderPathById`. */
13
13
  export declare function buildPhiMediaFolderNamesById(folders: PhiMediaAssetFolder[], folderId: number | null): string[];
14
14
  export declare function buildPhiMediaFolderValueById(folders: PhiMediaAssetFolder[], folderId: number | null): string;
15
- export declare function buildPhiMediaFolderCascaderOptions(folders: PhiMediaAssetFolder[]): {
15
+ /**
16
+ * A locked Folder is drawn with a lock, and named so where the caller has the word for it: the option's
17
+ * description is the hint every option row carries. It stays selectable -- a locked Folder is still read,
18
+ * only what it holds does not change.
19
+ */
20
+ export declare function buildPhiMediaFolderCascaderOptions(folders: PhiMediaAssetFolder[], presentation?: {
21
+ lockedLabel?: string;
22
+ }): ({
16
23
  value: string;
17
24
  label: string;
18
- }[];
25
+ } | {
26
+ description?: string | undefined;
27
+ icon: string;
28
+ value: string;
29
+ label: string;
30
+ })[];
19
31
  export declare function resolvePhiMediaFolderIdFromValue(folders: PhiMediaAssetFolder[], value: string | null | undefined): number | null;
20
32
  export declare function combinePhiMediaFlagValues(presentationFlags: number[]): number;
@@ -1,3 +1,4 @@
1
+ import { isPhiMediaFolderLocked } from "./media-folder-lock";
1
2
  /*
2
3
  * Folders as the media Controls offer them: a tree, a path of ids, a cascader value, and back. Pure
3
4
  * functions over the folder list, shared by every binding that lets somebody pick a folder -- the
@@ -52,17 +53,28 @@ export function buildPhiMediaFolderValueById(folders, folderId) {
52
53
  const path = buildPhiMediaFolderPathById(folders, folderId);
53
54
  return path.length > 0 ? `/${path.join("/")}` : "/";
54
55
  }
55
- export function buildPhiMediaFolderCascaderOptions(folders) {
56
+ /**
57
+ * A locked Folder is drawn with a lock, and named so where the caller has the word for it: the option's
58
+ * description is the hint every option row carries. It stays selectable -- a locked Folder is still read,
59
+ * only what it holds does not change.
60
+ */
61
+ export function buildPhiMediaFolderCascaderOptions(folders, presentation) {
56
62
  return [...folders]
57
63
  .sort((left, right) => {
58
64
  const leftPath = buildPhiMediaFolderPathById(folders, left.id);
59
65
  const rightPath = buildPhiMediaFolderPathById(folders, right.id);
60
66
  return leftPath.length - rightPath.length || left.sortOrder - right.sortOrder || left.id - right.id;
61
67
  })
62
- .map((folder) => ({
63
- value: buildPhiMediaFolderValueById(folders, folder.id),
64
- label: folder.name,
65
- }));
68
+ .map((folder) => {
69
+ const option = { value: buildPhiMediaFolderValueById(folders, folder.id), label: folder.name };
70
+ if (!isPhiMediaFolderLocked(folder))
71
+ return option;
72
+ return {
73
+ ...option,
74
+ icon: "lock",
75
+ ...(presentation?.lockedLabel ? { description: presentation.lockedLabel } : {}),
76
+ };
77
+ });
66
78
  }
67
79
  export function resolvePhiMediaFolderIdFromValue(folders, value) {
68
80
  const trimmed = value?.trim() ?? "";
@@ -2,6 +2,13 @@ export type PhiAssetPreviewToolWidgetLabels = {
2
2
  searchPlaceholder: string;
3
3
  folderLabel: string;
4
4
  createFolderLabel: string;
5
+ /** Beside a locked Folder wherever Folders are offered: the lock is drawn, and this names it. */
6
+ folderLockedLabel: string;
7
+ lockFolderLabel: string;
8
+ unlockFolderLabel: string;
9
+ /** Standing over a locked Folder's contents, and what a refusal because of the lock reads as. */
10
+ folderLockedText: string;
11
+ folderLockFailedText: string;
5
12
  flagsLabel: string;
6
13
  flagPlaceholder: string;
7
14
  uploadToggleLabel: string;
@@ -34,6 +41,8 @@ export type PhiAreaUploadWidgetLabels = {
34
41
  uploadFailedText: string;
35
42
  /** The body never reached the storage Provider, or the Provider refused it. */
36
43
  uploadStorageUnreachableText: string;
44
+ /** The Folder the upload was meant for is locked. */
45
+ uploadFolderLockedText: string;
37
46
  deleteFailedText: string;
38
47
  };
39
48
  export type PhiAssetPreviewGridWidgetLabels = {
@@ -3,6 +3,11 @@ export const PHI_MEDIA_WIDGET_DEFAULT_LABELS = {
3
3
  searchPlaceholder: "Search assets",
4
4
  folderLabel: "Folder",
5
5
  createFolderLabel: "Create folder",
6
+ folderLockedLabel: "Locked",
7
+ lockFolderLabel: "Lock folder",
8
+ unlockFolderLabel: "Unlock folder",
9
+ folderLockedText: "This folder is locked. Nothing can be added to it, moved in or out of it or deleted from it until it is unlocked.",
10
+ folderLockFailedText: "The folder could not be changed.",
6
11
  flagsLabel: "Flags",
7
12
  flagPlaceholder: "Flag",
8
13
  uploadToggleLabel: "Upload",
@@ -34,6 +39,7 @@ export const PHI_MEDIA_WIDGET_DEFAULT_LABELS = {
34
39
  uploadSuccessTemplate: "Uploaded %1.",
35
40
  uploadFailedText: "Upload failed.",
36
41
  uploadStorageUnreachableText: "The file storage could not be reached. The upload never left this browser.",
42
+ uploadFolderLockedText: "This folder is locked. Nothing can be uploaded into it until it is unlocked.",
37
43
  deleteFailedText: "Delete failed.",
38
44
  },
39
45
  grid: {
@@ -64,6 +64,7 @@ function resolveAreaUploadLabels(labels) {
64
64
  errorGeneric: labels.uploadFailedText,
65
65
  errorDuplicate: labels.assetExistsLabel,
66
66
  errorStorageUnreachable: labels.uploadStorageUnreachableText,
67
+ errorFolderLocked: labels.uploadFolderLockedText,
67
68
  };
68
69
  }
69
70
  /** A file still on its way, or one that failed, drawn as a tile like the Assets that arrived. */
@@ -7,10 +7,23 @@ export type PhiAssetFolderControlProps = {
7
7
  placeholder?: string;
8
8
  createLabel?: string;
9
9
  showCreate?: boolean;
10
+ /** A new Folder goes below the chosen one, which a locked Folder refuses. */
11
+ createDisabled?: boolean;
12
+ /**
13
+ * The lock of the chosen Folder, where the placement offers it: whether it is locked, and what the
14
+ * button says either way. Without a chosen Folder there is nothing to lock and no button.
15
+ */
16
+ lock?: {
17
+ locked: boolean;
18
+ lockLabel: string;
19
+ unlockLabel: string;
20
+ pending?: boolean;
21
+ onToggle: () => void;
22
+ } | null;
10
23
  allowClear?: boolean;
11
24
  size?: PhiControlSize;
12
25
  style?: CSSProperties;
13
26
  onChange?: (value: string) => void;
14
27
  onCreate?: () => void;
15
28
  };
16
- export declare function PhiAssetFolderControl({ value, options, placeholder, createLabel, showCreate, allowClear, size, style, onChange, onCreate, }: PhiAssetFolderControlProps): import("react").JSX.Element;
29
+ export declare function PhiAssetFolderControl({ value, options, placeholder, createLabel, showCreate, createDisabled, lock, allowClear, size, style, onChange, onCreate, }: PhiAssetFolderControlProps): import("react").JSX.Element;
@@ -4,12 +4,19 @@ import { PhiButtonControl } from "../controls/phi-button-control";
4
4
  import { PhiCascaderControl } from "../controls/phi-cascader-control";
5
5
  import { PhiToolbarControl } from "../controls/phi-toolbar-control";
6
6
  import { resolvePhiButtonIcon } from "../widgets/client/shared/phi-button-icons";
7
- export function PhiAssetFolderControl({ value, options, placeholder, createLabel, showCreate = false, allowClear = true, size, style, onChange, onCreate, }) {
8
- const cascader = (_jsx(PhiCascaderControl, { value: value, options: options, placeholder: placeholder, allowRoot: false, allowClear: allowClear, expandTrigger: "hover", rootValue: "/", separator: "/", normalize: "raw", size: size, style: showCreate
7
+ export function PhiAssetFolderControl({ value, options, placeholder, createLabel, showCreate = false, createDisabled = false, lock = null, allowClear = true, size, style, onChange, onCreate, }) {
8
+ const create = showCreate && onCreate ? (_jsx(PhiButtonControl, { ariaLabel: createLabel, tooltip: createLabel, icon: resolvePhiButtonIcon("add"), type: "primary", size: size, disabled: createDisabled, onClick: onCreate })) : null;
9
+ /*
10
+ * Drawn as the state it is in: a closed lock on a locked Folder, an open one on an unlocked one, and
11
+ * the tooltip names what pressing it does.
12
+ */
13
+ const lockButton = lock ? (_jsx(PhiButtonControl, { ariaLabel: lock.locked ? lock.unlockLabel : lock.lockLabel, tooltip: lock.locked ? lock.unlockLabel : lock.lockLabel, icon: resolvePhiButtonIcon(lock.locked ? "antd:lock" : "antd:unlock"), size: size, loading: lock.pending, onClick: lock.onToggle })) : null;
14
+ const grouped = create != null || lockButton != null;
15
+ const cascader = (_jsx(PhiCascaderControl, { value: value, options: options, placeholder: placeholder, allowRoot: false, allowClear: allowClear, expandTrigger: "hover", rootValue: "/", separator: "/", normalize: "raw", size: size, style: grouped
9
16
  ? { flex: "1 1 auto", minWidth: 0, width: "auto" }
10
17
  : { width: "100%", ...style }, onChange: onChange }));
11
- if (!showCreate || !onCreate) {
18
+ if (!grouped) {
12
19
  return cascader;
13
20
  }
14
- return (_jsxs(PhiToolbarControl, { compact: true, size: size, style: { width: "100%", ...style }, children: [cascader, _jsx(PhiButtonControl, { ariaLabel: createLabel, tooltip: createLabel, icon: resolvePhiButtonIcon("add"), type: "primary", size: size, onClick: onCreate })] }));
21
+ return (_jsxs(PhiToolbarControl, { compact: true, size: size, style: { width: "100%", ...style }, children: [cascader, lockButton, create] }));
15
22
  }
@@ -23,7 +23,6 @@ export type PhiImagePreviewStoreState = {
23
23
  selectedVariantKey: PhiImageAssetVariantKeyValue | null;
24
24
  selectedAsset: PhiMediaAssetTile | null;
25
25
  refreshToken: number;
26
- resolvedCollectionRequestKey: string | null;
27
26
  };
28
27
  export declare const phiImagePreviewStore: import("../state/plugin-state-store").PhiPluginStateStore<PhiImagePreviewStoreState>;
29
28
  export declare function usePhiImagePreviewStore(scopeKey: string): PhiImagePreviewStoreState;
@@ -40,11 +39,8 @@ export declare function setPhiImagePreviewResults(scopeKey: string, next: {
40
39
  spaces?: PhiMediaSpaceOption[];
41
40
  folders: PhiMediaAssetFolder[];
42
41
  pagination: PhiMediaPickerPagination | null;
43
- resolvedCollectionRequestKey?: string | null;
44
42
  }): void;
45
43
  export declare function updatePhiImagePreviewAsset(scopeKey: string, assetId: number, updater: (asset: PhiMediaAssetTile) => PhiMediaAssetTile): void;
46
- export declare function setPhiImagePreviewLoading(scopeKey: string, loading: boolean): void;
47
- export declare function setPhiImagePreviewError(scopeKey: string, error: string | null): void;
48
44
  export declare function setPhiImagePreviewSelection(scopeKey: string, selectedAssetId: number | null, selectedVariantKey: PhiImageAssetVariantKeyValue | null, selectedAsset?: PhiMediaAssetTile | null): void;
49
45
  export declare function bumpPhiImagePreviewRefreshToken(scopeKey: string): void;
50
46
  export declare function resetPhiImagePreviewStore(scopeKey: string): void;
@@ -23,7 +23,6 @@ function createDefaultState(scopeKey) {
23
23
  selectedVariantKey: null,
24
24
  selectedAsset: null,
25
25
  refreshToken: 0,
26
- resolvedCollectionRequestKey: null,
27
26
  };
28
27
  }
29
28
  export const phiImagePreviewStore = createPhiPluginStateStore("@phis/ui/media-preview", createDefaultState);
@@ -78,9 +77,6 @@ export function setPhiImagePreviewResults(scopeKey, next) {
78
77
  : next.assets.find((asset) => asset.id === current.selectedAssetId) ?? current.selectedAsset,
79
78
  loading: false,
80
79
  error: null,
81
- resolvedCollectionRequestKey: next.resolvedCollectionRequestKey === undefined
82
- ? current.resolvedCollectionRequestKey
83
- : next.resolvedCollectionRequestKey,
84
80
  }));
85
81
  }
86
82
  export function updatePhiImagePreviewAsset(scopeKey, assetId, updater) {
@@ -92,12 +88,6 @@ export function updatePhiImagePreviewAsset(scopeKey, assetId, updater) {
92
88
  : current.selectedAsset,
93
89
  }));
94
90
  }
95
- export function setPhiImagePreviewLoading(scopeKey, loading) {
96
- phiImagePreviewStore.patch(scopeKey, (current) => ({ ...current, loading }));
97
- }
98
- export function setPhiImagePreviewError(scopeKey, error) {
99
- phiImagePreviewStore.patch(scopeKey, (current) => ({ ...current, error, loading: false }));
100
- }
101
91
  export function setPhiImagePreviewSelection(scopeKey, selectedAssetId, selectedVariantKey, selectedAsset = null) {
102
92
  phiImagePreviewStore.patch(scopeKey, (current) => ({
103
93
  ...current,
@@ -28,10 +28,15 @@ export declare function usePhiMediaPickerBinding({ config, labels, searchLabels,
28
28
  label: string;
29
29
  }[];
30
30
  spaceValue: string | null;
31
- folders: {
31
+ folders: ({
32
32
  value: string;
33
33
  label: string;
34
- }[];
34
+ } | {
35
+ description?: string | undefined;
36
+ icon: string;
37
+ value: string;
38
+ label: string;
39
+ })[];
35
40
  folderValue: string;
36
41
  query: string;
37
42
  page: number;
@@ -28,6 +28,8 @@ export type PhiMediaUploadLabels = {
28
28
  errorSpaceUnavailable: string;
29
29
  /** The body never reached the storage Provider, or the Provider refused it. */
30
30
  errorStorageUnreachable: string;
31
+ /** The Folder the upload was meant for is locked; only an upload that names a Folder can meet it. */
32
+ errorFolderLocked: string;
31
33
  };
32
34
  /**
33
35
  * Text for a surface that has no label set of its own.
@@ -2,6 +2,7 @@
2
2
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
3
3
  import { PhiMediaKind, resolvePhiMediaKindFromContentType } from "../../constants/media";
4
4
  import { PhiMediaUploadError, isPhiMediaUploadCancelled, runPhiMediaUploadSession, } from "./media-upload-flow";
5
+ import { PHI_MEDIA_UPLOAD_FOLDER_LOCKED_CODE } from "./media-folder-lock";
5
6
  /**
6
7
  * Text for a surface that has no label set of its own.
7
8
  *
@@ -18,6 +19,7 @@ export const PHI_MEDIA_UPLOAD_DEFAULT_LABELS = {
18
19
  errorQuotaExceeded: "There is no room left in this space.",
19
20
  errorSpaceUnavailable: "That space is not available.",
20
21
  errorStorageUnreachable: "The file storage could not be reached.",
22
+ errorFolderLocked: "This folder is locked. Nothing can be uploaded into it until it is unlocked.",
21
23
  };
22
24
  /** The `accept` attribute a file dialog should carry, derived rather than written out by each caller. */
23
25
  export function resolvePhiMediaUploadAccept(acceptance) {
@@ -97,6 +99,7 @@ export function readPhiMediaUploadErrorMessage(error, labels) {
97
99
  // Provider, so this is deliberately not the same reading as a network failure.
98
100
  case "storage_unreachable":
99
101
  case "storage_rejected": return labels.errorStorageUnreachable;
102
+ case PHI_MEDIA_UPLOAD_FOLDER_LOCKED_CODE: return labels.errorFolderLocked;
100
103
  default: break;
101
104
  }
102
105
  // A TypeError from fetch is the browser saying it never reached the site at all.
@@ -20,6 +20,8 @@ type PhiCmsRegionContainerClientProps = {
20
20
  availableLocales?: string[];
21
21
  /** Whether the Region's top Layout paints a ground of its own (`phiCmsRegionRootLayoutPaintsGround`). */
22
22
  rootPaintsGround?: boolean;
23
+ /** Whether the Region's top Layout names a value per profile (`phiBlockGeometryQueriesRoom`). */
24
+ rootQueriesRoom?: boolean;
23
25
  };
24
26
  /**
25
27
  * A Region that stays alive after it has rendered: it takes signals, runs effects, collapses, or moves
@@ -27,5 +29,5 @@ type PhiCmsRegionContainerClientProps = {
27
29
  * fed with the config merged with the live runtime state and painted in the live colour mode. What is
28
30
  * left here is what only a live Region has.
29
31
  */
30
- export declare function PhiCmsRegionContainerClient({ children, className, regionKey, config: initialConfig, shellTheme, style, regionType, previewMode, runtime, routeScope, pageScope: resolvedPageScope, availableLocales, rootPaintsGround, }: PhiCmsRegionContainerClientProps): import("react").JSX.Element | null;
32
+ export declare function PhiCmsRegionContainerClient({ children, className, regionKey, config: initialConfig, shellTheme, style, regionType, previewMode, runtime, routeScope, pageScope: resolvedPageScope, availableLocales, rootPaintsGround, rootQueriesRoom, }: PhiCmsRegionContainerClientProps): import("react").JSX.Element | null;
31
33
  export {};
@@ -32,7 +32,7 @@ import { usePhiRegionRevealed, usePhiShellHeaderTopRoom } from "./use-phi-region
32
32
  * fed with the config merged with the live runtime state and painted in the live colour mode. What is
33
33
  * left here is what only a live Region has.
34
34
  */
35
- export function PhiCmsRegionContainerClient({ children, className, regionKey, config: initialConfig, shellTheme, style, regionType, previewMode = false, runtime, routeScope, pageScope: resolvedPageScope = null, availableLocales, rootPaintsGround = false, }) {
35
+ export function PhiCmsRegionContainerClient({ children, className, regionKey, config: initialConfig, shellTheme, style, regionType, previewMode = false, runtime, routeScope, pageScope: resolvedPageScope = null, availableLocales, rootPaintsGround = false, rootQueriesRoom = false, }) {
36
36
  const { mode: liveThemeMode, token } = usePhiConfig();
37
37
  const receiver = createPhiRenderableBlockReceiver("region", regionKey);
38
38
  const anchorRef = usePhiVisualAnchor(receiver);
@@ -143,6 +143,7 @@ export function PhiCmsRegionContainerClient({ children, className, regionKey, co
143
143
  className,
144
144
  style,
145
145
  rootPaintsGround,
146
+ rootQueriesRoom,
146
147
  });
147
148
  if (shell == null) {
148
149
  return null;
@@ -168,7 +169,7 @@ export function PhiCmsRegionContainerClient({ children, className, regionKey, co
168
169
  const withTone = (element) => shell.tone ? _jsx(PhiSurfaceTone, { tone: shell.tone, children: element }) : element;
169
170
  if (shell.family !== "sider") {
170
171
  const Element = shell.element;
171
- return withTone(_jsxs(Element, { ...attributes, ref: setElementRef, style: shell.style, children: [backgroundMotionLayer, _jsx("div", { className: "phi-cms-region-shell__content", style: shell.contentStyle, children: children }), revealZone, effectObservers] }));
172
+ return withTone(_jsxs(Element, { ...attributes, ref: setElementRef, style: shell.style, children: [backgroundMotionLayer, _jsx("div", { className: "phi-cms-region-shell__content", ...shell.contentAttributes, style: shell.contentStyle, children: children }), revealZone, effectObservers] }));
172
173
  }
173
174
  const isRightSider = regionKey === "sider_right";
174
175
  const collapsible = hasPhiFlag(config.flags, PhiCmsFlags.Collapsible);
@@ -223,7 +224,7 @@ export function PhiCmsRegionContainerClient({ children, className, regionKey, co
223
224
  minWidth: 0,
224
225
  flex: "1 1 auto",
225
226
  minHeight: 0,
226
- }, children: _jsx("div", { className: "phi-cms-region-shell__content", style: {
227
+ }, children: _jsx("div", { className: "phi-cms-region-shell__content", ...shell.contentAttributes, style: {
227
228
  ...shell.contentStyle,
228
229
  transition: collapsible
229
230
  ? "opacity 180ms ease"
@@ -17,6 +17,8 @@ export type PhiCmsRegionContainerProps = {
17
17
  pageScope?: PhiCmsResolvedRegionPageScope | null;
18
18
  /** Whether the Region's top Layout paints a ground of its own (`phiCmsRegionRootLayoutPaintsGround`). */
19
19
  rootPaintsGround?: boolean;
20
+ /** Whether the Region's top Layout names a value per profile (`phiBlockGeometryQueriesRoom`). */
21
+ rootQueriesRoom?: boolean;
20
22
  };
21
- export declare function PhiCmsRegionContainer({ children, className, regionKey, config, shellTheme, style, regionType, previewMode, runtime, signalParticipant, pageScope, rootPaintsGround, }: PhiCmsRegionContainerProps): import("react").JSX.Element;
23
+ export declare function PhiCmsRegionContainer({ children, className, regionKey, config, shellTheme, style, regionType, previewMode, runtime, signalParticipant, pageScope, rootPaintsGround, rootQueriesRoom, }: PhiCmsRegionContainerProps): import("react").JSX.Element;
22
24
  export {};
@@ -9,7 +9,7 @@ import { PhiRuntimeModuleRenderClientHost } from "../runtime/runtime-module-rend
9
9
  import { PhiRuntimeRenderClientType } from "../../constants/runtime-render-client-types";
10
10
  import { resolvePhiBackgroundMotion } from "../widgets/config/background";
11
11
  import { readPhiCmsRegionReveal } from "../../helpers/region-page-scope";
12
- export function PhiCmsRegionContainer({ children, className, regionKey, config, shellTheme, style, regionType, previewMode = false, runtime, signalParticipant = false, pageScope = null, rootPaintsGround = false, }) {
12
+ export function PhiCmsRegionContainer({ children, className, regionKey, config, shellTheme, style, regionType, previewMode = false, runtime, signalParticipant = false, pageScope = null, rootPaintsGround = false, rootQueriesRoom = false, }) {
13
13
  const routeScope = isPhiCmsPageOwnedRegion(regionKey) ? "page" : "area";
14
14
  const effectsConfig = config?.effects == null ? undefined : { effects: config.effects };
15
15
  const effectsAttributes = resolveRenderableBlockEffectsAttributes(effectsConfig);
@@ -32,7 +32,7 @@ export function PhiCmsRegionContainer({ children, className, regionKey, config,
32
32
  requiresEffectsObserver ||
33
33
  resolvePhiBackgroundMotion(config?.surface?.background) != null;
34
34
  if (!requiresClientEnhancement) {
35
- return (_jsx(PhiCmsRegionStatic, { className: className, regionKey: regionKey, config: config, shellTheme: shellTheme, style: style, regionType: regionType, previewMode: previewMode, rootPaintsGround: rootPaintsGround, children: children }));
35
+ return (_jsx(PhiCmsRegionStatic, { className: className, regionKey: regionKey, config: config, shellTheme: shellTheme, style: style, regionType: regionType, previewMode: previewMode, rootPaintsGround: rootPaintsGround, rootQueriesRoom: rootQueriesRoom, children: children }));
36
36
  }
37
37
  return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiRuntimeRenderClientType.RegionContainerEnhancer, componentProps: {
38
38
  children,
@@ -44,6 +44,7 @@ export function PhiCmsRegionContainer({ children, className, regionKey, config,
44
44
  regionType,
45
45
  previewMode,
46
46
  rootPaintsGround,
47
+ rootQueriesRoom,
47
48
  runtime: {
48
49
  siteKey: runtime.site.key,
49
50
  publicUrl: runtime.site.publicUrl ?? null,
@@ -6,6 +6,7 @@ import type { PhiBlockRuntime, PhiCmsRegionConfig, PhiCmsRegionKey, PhiRenderabl
6
6
  import { type PhiSurfaceGround } from "../../helpers/surface-style";
7
7
  import type { PhiCmsRegionReveal } from "../../types/cms-presets";
8
8
  import { type PhiCmsBackgroundWidgetConfig } from "../widgets/config/background";
9
+ import { phiSlotContainerAttributes } from "../../helpers/block-geometry-profiles";
9
10
  /**
10
11
  * The Region-shell resolver (LAYOUTING.md "Regions"): what a Shell Region's root element looks like, for
11
12
  * the static renderer and the client-enhanced one alike.
@@ -71,6 +72,11 @@ export type PhiCmsRegionShellInput = {
71
72
  * family's pane paint one behind it (SHELL.md "A band with a ground of its own").
72
73
  */
73
74
  rootPaintsGround?: boolean;
75
+ /**
76
+ * Whether the Layout at the top of this Region names a value per profile; the content wrapper is then
77
+ * the `phi-slot` container its queries ask (design/RESPONSIVE_BLOCK_GEOMETRY.md).
78
+ */
79
+ rootQueriesRoom?: boolean;
74
80
  };
75
81
  export type PhiCmsRegionShell = {
76
82
  family: PhiCmsRegionShellFamily;
@@ -100,6 +106,8 @@ export type PhiCmsRegionShell = {
100
106
  style: CSSProperties;
101
107
  /** The content wrapper's style, which is where Region padding lives (LAYOUTING.md "Regions"). */
102
108
  contentStyle: CSSProperties;
109
+ /** The content wrapper's attributes: the `phi-slot` container where the root Layout names a profile. */
110
+ contentAttributes: ReturnType<typeof phiSlotContainerAttributes>;
103
111
  };
104
112
  /**
105
113
  * Whether a Region is a Sider that sticks under the Header, and so needs the Header's measured bottom.
@@ -133,5 +141,5 @@ export declare function phiCmsRegionFooterSticks(regionKey: PhiCmsRegionKey, con
133
141
  * Background record the Builder stores on every box it has opened is no ground.
134
142
  */
135
143
  export declare function phiCmsRegionRootLayoutPaintsGround(rootConfig: unknown): boolean;
136
- export declare function resolvePhiCmsRegionShell({ regionKey, config, shellTheme, paint, animatesBackground, previewMode, regionType, className, style, rootPaintsGround, }: PhiCmsRegionShellInput): PhiCmsRegionShell | null;
144
+ export declare function resolvePhiCmsRegionShell({ regionKey, config, shellTheme, paint, animatesBackground, previewMode, regionType, className, style, rootPaintsGround, rootQueriesRoom, }: PhiCmsRegionShellInput): PhiCmsRegionShell | null;
137
145
  export {};
@@ -14,6 +14,7 @@ import { readPhiCmsRegionReveal } from "../../helpers/region-page-scope";
14
14
  import { resolvePhiPaddingStyle } from "../layouts/phi-layout-contract";
15
15
  import { PHI_SHELL_STICKY_BOTTOM_PROPERTY, PHI_SHELL_STICKY_TOP_PROPERTY, phiRegionUsesShellChromeOverlay, } from "../root/phi-shell-chrome-overlay";
16
16
  import { normalizePhiBackgroundWidgetConfig, phiBackgroundWidgetConfigPaintsGround, resolvePhiBackgroundGroundFilter, resolvePhiBackgroundMotion, resolvePhiBackgroundMotionHostStyle, resolvePhiBackgroundPane, resolvePhiBackgroundWidgetStyle, } from "../widgets/config/background";
17
+ import { phiSlotContainerAttributes } from "../../helpers/block-geometry-profiles";
17
18
  /*
18
19
  * The longhands every Region that paints the Shell Chrome Overlay (SHELL.md) carries, read from the
19
20
  * custom properties the Root Layout publishes. The colour is here as well as in `shell.css`'s marker
@@ -144,7 +145,7 @@ export function phiCmsRegionRootLayoutPaintsGround(rootConfig) {
144
145
  || phiBackgroundWidgetConfigPaintsGround(surface.background ?? null)
145
146
  || phiBackgroundWidgetConfigPaintsGround(surface.backgroundDark ?? null);
146
147
  }
147
- export function resolvePhiCmsRegionShell({ regionKey, config, shellTheme, paint, animatesBackground = false, previewMode = false, regionType, className, style, rootPaintsGround = false, }) {
148
+ export function resolvePhiCmsRegionShell({ regionKey, config, shellTheme, paint, animatesBackground = false, previewMode = false, regionType, className, style, rootPaintsGround = false, rootQueriesRoom = false, }) {
148
149
  const visibility = config.visibility ?? "visible";
149
150
  const enabled = config.enabled ?? true;
150
151
  if (visibility === "hidden" ||
@@ -491,5 +492,6 @@ export function resolvePhiCmsRegionShell({ regionKey, config, shellTheme, paint,
491
492
  paddingBottom: config.paddingBottom,
492
493
  paddingLeft: config.paddingLeft,
493
494
  }),
495
+ contentAttributes: phiSlotContainerAttributes(rootQueriesRoom),
494
496
  };
495
497
  }
@@ -12,10 +12,12 @@ export type PhiCmsRegionStaticProps = {
12
12
  previewMode?: boolean;
13
13
  /** Whether the Region's top Layout paints a ground of its own (`phiCmsRegionRootLayoutPaintsGround`). */
14
14
  rootPaintsGround?: boolean;
15
+ /** Whether the Region's top Layout names a value per profile (`phiBlockGeometryQueriesRoom`). */
16
+ rootQueriesRoom?: boolean;
15
17
  };
16
18
  /**
17
19
  * A Region with nothing to do after it has rendered. Everything it draws comes from the Region-shell
18
20
  * resolver it shares with the client renderer; it does not know the colour mode, so it publishes both
19
21
  * and lets `shell.css` switch them.
20
22
  */
21
- export declare function PhiCmsRegionStatic({ children, className, regionKey, config, shellTheme, style, regionType, previewMode, rootPaintsGround, }: PhiCmsRegionStaticProps): import("react").JSX.Element | null;
23
+ export declare function PhiCmsRegionStatic({ children, className, regionKey, config, shellTheme, style, regionType, previewMode, rootPaintsGround, rootQueriesRoom, }: PhiCmsRegionStaticProps): import("react").JSX.Element | null;
@@ -7,7 +7,7 @@ import { PhiSurfaceTone } from "../surface/phi-surface-tone";
7
7
  * resolver it shares with the client renderer; it does not know the colour mode, so it publishes both
8
8
  * and lets `shell.css` switch them.
9
9
  */
10
- export function PhiCmsRegionStatic({ children, className, regionKey, config = {}, shellTheme, style, regionType, previewMode = false, rootPaintsGround = false, }) {
10
+ export function PhiCmsRegionStatic({ children, className, regionKey, config = {}, shellTheme, style, regionType, previewMode = false, rootPaintsGround = false, rootQueriesRoom = false, }) {
11
11
  const shell = resolvePhiCmsRegionShell({
12
12
  regionKey,
13
13
  config,
@@ -18,11 +18,12 @@ export function PhiCmsRegionStatic({ children, className, regionKey, config = {}
18
18
  className,
19
19
  style,
20
20
  rootPaintsGround,
21
+ rootQueriesRoom,
21
22
  });
22
23
  if (shell == null) {
23
24
  return null;
24
25
  }
25
26
  const Element = shell.element;
26
- const element = (_jsxs(Element, { ...shell.attributes, style: shell.style, children: [_jsx(PhiSurfaceGroundLayer, { ground: shell.ground }), _jsx("div", { className: "phi-cms-region-shell__content", style: shell.contentStyle, children: children })] }));
27
+ const element = (_jsxs(Element, { ...shell.attributes, style: shell.style, children: [_jsx(PhiSurfaceGroundLayer, { ground: shell.ground }), _jsx("div", { className: "phi-cms-region-shell__content", ...shell.contentAttributes, style: shell.contentStyle, children: children })] }));
27
28
  return shell.tone ? _jsx(PhiSurfaceTone, { tone: shell.tone, children: element }) : element;
28
29
  }
@@ -12,8 +12,8 @@ import type { PhiCmsPageNode, PhiResolvedCmsPageTree } from "../../../types/cms"
12
12
  /**
13
13
  * The first place a navigation subtree actually goes.
14
14
  *
15
- * An Overlay opener is not a destination, so it can never be what a redirect lands on. Neither is the
16
- * path the redirecting page itself answers: an Area root whose sidebar still carries an item pointing
15
+ * An Overlay opener is not a destination, so it can never be what a redirect lands on, and an external
16
+ * address is not a place in the Area. Neither is the path the redirecting page itself answers: an Area root whose sidebar still carries an item pointing
17
17
  * at "/" would forward to itself forever, which is the whole reason `skipPath` exists.
18
18
  */
19
19
  export declare function findFirstPhiCmsNavigationLinkPath(items: readonly PhiCmsResolvedNavigationItem[], skipPath?: string): string | null;
@@ -12,13 +12,15 @@ import { readPhiCmsNavigationTargetPath } from "../../../helpers/navigation-targ
12
12
  /**
13
13
  * The first place a navigation subtree actually goes.
14
14
  *
15
- * An Overlay opener is not a destination, so it can never be what a redirect lands on. Neither is the
16
- * path the redirecting page itself answers: an Area root whose sidebar still carries an item pointing
15
+ * An Overlay opener is not a destination, so it can never be what a redirect lands on, and an external
16
+ * address is not a place in the Area. Neither is the path the redirecting page itself answers: an Area root whose sidebar still carries an item pointing
17
17
  * at "/" would forward to itself forever, which is the whole reason `skipPath` exists.
18
18
  */
19
19
  export function findFirstPhiCmsNavigationLinkPath(items, skipPath) {
20
20
  for (const item of items) {
21
- const path = readPhiCmsNavigationTargetPath(item.target);
21
+ const path = item.target?.kind === "custom" && item.target.external === true
22
+ ? null
23
+ : readPhiCmsNavigationTargetPath(item.target);
22
24
  if (item.kind === "link" && path && path !== skipPath) {
23
25
  return path;
24
26
  }
@@ -60,6 +60,7 @@ declare const PHI_ANTD_ICON_LOADERS: {
60
60
  readonly LayoutOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/LayoutOutlined")>;
61
61
  readonly LeftOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/LeftOutlined")>;
62
62
  readonly LinkOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/LinkOutlined")>;
63
+ readonly LockOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/LockOutlined")>;
63
64
  readonly LogoutOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/LogoutOutlined")>;
64
65
  readonly MailOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/MailOutlined")>;
65
66
  readonly MenuFoldOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/MenuFoldOutlined")>;
@@ -99,6 +100,7 @@ declare const PHI_ANTD_ICON_LOADERS: {
99
100
  readonly TeamOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/TeamOutlined")>;
100
101
  readonly TranslationOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/TranslationOutlined")>;
101
102
  readonly UndoOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/UndoOutlined")>;
103
+ readonly UnlockOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/UnlockOutlined")>;
102
104
  readonly UnorderedListOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/UnorderedListOutlined")>;
103
105
  readonly UpOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/UpOutlined")>;
104
106
  readonly UploadOutlined: () => Promise<typeof import("@ant-design/icons-svg/es/asn/UploadOutlined")>;
@@ -81,6 +81,7 @@ const PHI_ANTD_ICON_LOADERS = {
81
81
  LayoutOutlined: () => import("@ant-design/icons-svg/es/asn/LayoutOutlined"),
82
82
  LeftOutlined: () => import("@ant-design/icons-svg/es/asn/LeftOutlined"),
83
83
  LinkOutlined: () => import("@ant-design/icons-svg/es/asn/LinkOutlined"),
84
+ LockOutlined: () => import("@ant-design/icons-svg/es/asn/LockOutlined"),
84
85
  LogoutOutlined: () => import("@ant-design/icons-svg/es/asn/LogoutOutlined"),
85
86
  MailOutlined: () => import("@ant-design/icons-svg/es/asn/MailOutlined"),
86
87
  MenuFoldOutlined: () => import("@ant-design/icons-svg/es/asn/MenuFoldOutlined"),
@@ -120,6 +121,7 @@ const PHI_ANTD_ICON_LOADERS = {
120
121
  TeamOutlined: () => import("@ant-design/icons-svg/es/asn/TeamOutlined"),
121
122
  TranslationOutlined: () => import("@ant-design/icons-svg/es/asn/TranslationOutlined"),
122
123
  UndoOutlined: () => import("@ant-design/icons-svg/es/asn/UndoOutlined"),
124
+ UnlockOutlined: () => import("@ant-design/icons-svg/es/asn/UnlockOutlined"),
123
125
  UnorderedListOutlined: () => import("@ant-design/icons-svg/es/asn/UnorderedListOutlined"),
124
126
  UpOutlined: () => import("@ant-design/icons-svg/es/asn/UpOutlined"),
125
127
  UploadOutlined: () => import("@ant-design/icons-svg/es/asn/UploadOutlined"),
@@ -345,6 +347,8 @@ export const PHI_ANTD_ICON_NAMES = {
345
347
  "folder-add-outlined": "FolderAddOutlined",
346
348
  link: "LinkOutlined",
347
349
  "link-outlined": "LinkOutlined",
350
+ lock: "LockOutlined",
351
+ "lock-outlined": "LockOutlined",
348
352
  minus: "MinusOutlined",
349
353
  "minus-outlined": "MinusOutlined",
350
354
  inbox: "InboxOutlined",
@@ -363,6 +367,8 @@ export const PHI_ANTD_ICON_NAMES = {
363
367
  "stop-outlined": "StopOutlined",
364
368
  undo: "UndoOutlined",
365
369
  "undo-outlined": "UndoOutlined",
370
+ unlock: "UnlockOutlined",
371
+ "unlock-outlined": "UnlockOutlined",
366
372
  };
367
373
  export function PhiAntdIcon({ icon, size = "1em", style, className, title, ariaLabel, twoToneColor, }) {
368
374
  const sizeStyle = size === "1em" ? undefined : { fontSize: size };
@@ -20,6 +20,10 @@ const PHI_GEOMETRY_WIDGET_LABEL_SET = definePhiLabelSet({
20
20
  field_max_size: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.fields.maxSize,
21
21
  field_z_index: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.fields.zIndex,
22
22
  field_viewport: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.fields.viewport,
23
+ field_profile: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.fields.profile,
24
+ profile_compact: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.profiles.compact,
25
+ profile_medium: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.profiles.medium,
26
+ profile_wide: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.profiles.wide,
23
27
  viewport_compact: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.viewport.compact,
24
28
  viewport_medium: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.viewport.medium,
25
29
  viewport_wide: PHI_GEOMETRY_WIDGET_DEFAULT_LABELS.viewport.wide,
@@ -46,6 +50,12 @@ export async function getPhiGeometryWidgetLabels(options) {
46
50
  maxSize: labels.field_max_size,
47
51
  zIndex: labels.field_z_index,
48
52
  viewport: labels.field_viewport,
53
+ profile: labels.field_profile,
54
+ },
55
+ profiles: {
56
+ compact: labels.profile_compact,
57
+ medium: labels.profile_medium,
58
+ wide: labels.profile_wide,
49
59
  },
50
60
  viewport: {
51
61
  compact: labels.viewport_compact,