@phis/ui 0.6.2 → 0.6.3

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 (201) hide show
  1. package/components/cms/phi-cms-root-layout.js +2 -0
  2. package/components/controls/phi-mask-picker-control.d.ts +7 -1
  3. package/components/controls/phi-mask-picker-control.js +18 -16
  4. package/components/controls/phi-media-picker-control.d.ts +30 -1
  5. package/components/controls/phi-media-picker-control.js +15 -2
  6. package/components/controls/phi-media-source-item-tile-control.d.ts +22 -0
  7. package/components/controls/phi-media-source-item-tile-control.js +65 -0
  8. package/components/forms/form-field-labels.d.ts +19 -0
  9. package/components/forms/form-field-labels.js +78 -0
  10. package/components/forms/form-provider-contract.d.ts +1 -17
  11. package/components/forms/form-provider-contract.js +4 -18
  12. package/components/forms/media-asset-field-keys.d.ts +27 -0
  13. package/components/forms/media-asset-field-keys.js +27 -0
  14. package/components/forms/phi-form-widget.js +5 -1
  15. package/components/forms/upload-field-keys.d.ts +27 -0
  16. package/components/forms/upload-field-keys.js +27 -0
  17. package/components/forms/upload-form-control.js +11 -5
  18. package/components/media/asset-controller-requirement.d.ts +9 -0
  19. package/components/media/asset-controller-requirement.js +42 -0
  20. package/components/media/label-sets/media-upload.d.ts +10 -0
  21. package/components/media/label-sets/media-upload.js +85 -0
  22. package/components/media/label-sets/media.js +31 -135
  23. package/components/media/media-upload-labels.d.ts +43 -0
  24. package/components/media/media-upload-labels.js +23 -0
  25. package/components/media/media-upload-refusals.d.ts +12 -0
  26. package/components/media/media-upload-refusals.js +28 -0
  27. package/components/media/media-widget-labels.d.ts +33 -26
  28. package/components/media/media-widget-labels.js +27 -36
  29. package/components/media/phi-area-upload-widget.js +3 -4
  30. package/components/media/phi-asset-inspector-section.d.ts +2 -2
  31. package/components/media/phi-image-inspector-widget.d.ts +2 -5
  32. package/components/media/phi-media-picker-binding.d.ts +17 -0
  33. package/components/media/phi-media-picker-binding.js +199 -4
  34. package/components/media/phi-media-picker-labels.d.ts +7 -0
  35. package/components/media/phi-media-picker-labels.js +25 -0
  36. package/components/media/phi-media-sources.d.ts +69 -0
  37. package/components/media/phi-media-sources.js +254 -0
  38. package/components/media/phi-media-upload.d.ts +1 -27
  39. package/components/media/phi-media-upload.js +4 -48
  40. package/components/runtime/runtime-controller-materialization.d.ts +5 -4
  41. package/components/runtime/runtime-controller-materialization.js +5 -4
  42. package/components/runtime/runtime-module-context.d.ts +5 -1
  43. package/components/runtime/runtime-module-context.js +4 -1
  44. package/components/runtime/runtime-module-media-source-client-manifest.d.ts +17 -0
  45. package/components/runtime/runtime-module-media-source-client-manifest.js +53 -0
  46. package/components/widgets/client/shared/phi-mask-picker.js +23 -13
  47. package/components/widgets/client/shared/phi-widget-image-tool-button.d.ts +7 -5
  48. package/components/widgets/client/shared/phi-widget-image-tool-button.js +11 -7
  49. package/components/widgets/client/shared/phi-widget-tool-buttons.js +2 -2
  50. package/components/widgets/config/mask.d.ts +6 -8
  51. package/components/widgets/config/mask.js +14 -12
  52. package/components/widgets/label-sets/authoring-tools.js +55 -1
  53. package/components/widgets/label-sets/history.js +0 -2
  54. package/components/widgets/label-sets/slot-upload.js +4 -4
  55. package/components/widgets/label-types/authoring-tools.d.ts +10 -0
  56. package/components/widgets/label-types/authoring-tools.js +6 -0
  57. package/components/widgets/label-types/history.d.ts +1 -1
  58. package/components/widgets/label-types/history.js +0 -1
  59. package/components/widgets/label-types/mask-picker.d.ts +31 -0
  60. package/components/widgets/label-types/mask-picker.js +30 -0
  61. package/components/widgets/label-types/slot-upload.d.ts +2 -2
  62. package/controls.d.ts +2 -0
  63. package/controls.js +1 -0
  64. package/helpers/cms-region-keys.d.ts +1 -1
  65. package/module-client.d.ts +5 -1
  66. package/module-projection-client.js +1 -0
  67. package/next/areas/accounting-client.js +3 -2
  68. package/next/areas/admin-client.js +3 -2
  69. package/next/areas/app-client.js +3 -2
  70. package/next/areas/builder-client.js +3 -2
  71. package/next/areas/editor-client.js +3 -2
  72. package/next/areas/public-client.js +3 -2
  73. package/next/runtime-module-client-boundary.d.ts +3 -1
  74. package/next/runtime-module-client-boundary.js +3 -2
  75. package/package.json +7 -2
  76. package/plugins/runtime-modules/area-module-defaults.js +4 -3
  77. package/plugins/runtime-modules/asset/controller/definition.d.ts +2 -2
  78. package/plugins/runtime-modules/asset/controller/runtime.js +2 -2
  79. package/plugins/runtime-modules/asset/definition.d.ts +3 -2
  80. package/plugins/runtime-modules/asset/definition.js +11 -3
  81. package/plugins/runtime-modules/asset/ids.d.ts +8 -0
  82. package/plugins/runtime-modules/asset/ids.js +8 -0
  83. package/plugins/runtime-modules/asset/labels.d.ts +4 -0
  84. package/plugins/runtime-modules/asset/labels.js +94 -0
  85. package/plugins/runtime-modules/asset/media-asset-form-control.js +32 -7
  86. package/plugins/runtime-modules/asset/metadata-form.js +27 -18
  87. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +14 -11
  88. package/plugins/runtime-modules/asset/widgets/area-upload/config.d.ts +2 -0
  89. package/plugins/runtime-modules/asset/widgets/area-upload/config.js +3 -0
  90. package/plugins/runtime-modules/asset/widgets/area-upload/server.js +3 -3
  91. package/plugins/runtime-modules/asset/widgets/asset-focal-rect/config.d.ts +2 -0
  92. package/plugins/runtime-modules/asset/widgets/asset-focal-rect/config.js +3 -0
  93. package/plugins/runtime-modules/asset/widgets/image-inspector/config.d.ts +2 -0
  94. package/plugins/runtime-modules/asset/widgets/image-inspector/config.js +3 -0
  95. package/plugins/runtime-modules/asset/widgets/image-inspector/server.js +2 -2
  96. package/plugins/runtime-modules/asset/widgets/media-picker/config.d.ts +1 -0
  97. package/plugins/runtime-modules/asset/widgets/media-picker/config.js +3 -0
  98. package/plugins/runtime-modules/auth/presets.d.ts +11 -0
  99. package/plugins/runtime-modules/auth/presets.js +17 -8
  100. package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +1 -4
  101. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +2 -2
  102. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +1 -3
  103. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +4 -5
  104. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -8
  105. package/plugins/runtime-modules/builder/clients/pages-header.js +2 -0
  106. package/plugins/runtime-modules/builder/clients/widget-inspector.js +0 -1
  107. package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -1
  108. package/plugins/runtime-modules/builder/controller/page-controller.js +3 -3
  109. package/plugins/runtime-modules/builder/controller/workspace-controller.js +4 -1
  110. package/plugins/runtime-modules/builder/inspector-section-widget.js +5 -2
  111. package/plugins/runtime-modules/builder/module-authoring-catalog.server.js +3 -1
  112. package/plugins/runtime-modules/builder/navigation-catalog.server.js +3 -0
  113. package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +1 -1
  114. package/plugins/runtime-modules/builder/offered-page-catalog.js +8 -3
  115. package/plugins/runtime-modules/builder/options-providers.js +2 -2
  116. package/plugins/runtime-modules/builder/page-address-rule.d.ts +7 -0
  117. package/plugins/runtime-modules/builder/page-address-rule.js +12 -0
  118. package/plugins/runtime-modules/builder/page-presets.server.js +4 -0
  119. package/plugins/runtime-modules/builder/persistence.js +2 -3
  120. package/plugins/runtime-modules/builder/public-route-collisions.d.ts +1 -1
  121. package/plugins/runtime-modules/builder/public-route-collisions.js +6 -1
  122. package/plugins/runtime-modules/builder/runtime-module-sandbox.server.js +8 -1
  123. package/plugins/runtime-modules/builder/runtime-module-selection.js +5 -5
  124. package/plugins/runtime-modules/builder/services/runtime-modules-table.js +24 -6
  125. package/plugins/runtime-modules/builder/signal-endpoints.js +2 -1
  126. package/plugins/runtime-modules/builder/use-offered-page-catalog.d.ts +2 -2
  127. package/plugins/runtime-modules/builder/use-offered-page-catalog.js +5 -3
  128. package/plugins/runtime-modules/builder/widgets/structure-region/plugin.js +19 -12
  129. package/plugins/runtime-modules/client-manifests/accounting.d.ts +1 -0
  130. package/plugins/runtime-modules/client-manifests/accounting.js +1 -0
  131. package/plugins/runtime-modules/client-manifests/admin.d.ts +1 -0
  132. package/plugins/runtime-modules/client-manifests/admin.js +1 -0
  133. package/plugins/runtime-modules/client-manifests/app.d.ts +1 -0
  134. package/plugins/runtime-modules/client-manifests/app.js +1 -0
  135. package/plugins/runtime-modules/client-manifests/builder.d.ts +1 -0
  136. package/plugins/runtime-modules/client-manifests/builder.js +1 -0
  137. package/plugins/runtime-modules/client-manifests/common.d.ts +1 -0
  138. package/plugins/runtime-modules/client-manifests/common.js +3 -0
  139. package/plugins/runtime-modules/client-manifests/editor.d.ts +1 -0
  140. package/plugins/runtime-modules/client-manifests/editor.js +1 -0
  141. package/plugins/runtime-modules/client-manifests/public.d.ts +1 -0
  142. package/plugins/runtime-modules/client-manifests/public.js +1 -0
  143. package/plugins/runtime-modules/contracts.js +61 -0
  144. package/plugins/runtime-modules/core/client-media-sources.d.ts +5 -0
  145. package/plugins/runtime-modules/core/client-media-sources.js +6 -0
  146. package/plugins/runtime-modules/core/messaging/forms.js +2 -15
  147. package/plugins/runtime-modules/core/messaging/labels.d.ts +0 -12
  148. package/plugins/runtime-modules/core/messaging/labels.js +0 -24
  149. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +10 -6
  150. package/plugins/runtime-modules/core/widgets/collection-view/config.d.ts +1 -0
  151. package/plugins/runtime-modules/core/widgets/collection-view/config.js +7 -0
  152. package/plugins/runtime-modules/core/widgets/collection-view/image-preview-grid.d.ts +8 -2
  153. package/plugins/runtime-modules/core/widgets/collection-view/image-preview-grid.js +2 -2
  154. package/plugins/runtime-modules/core/widgets/collection-view/server.d.ts +1 -1
  155. package/plugins/runtime-modules/core/widgets/collection-view/server.js +14 -2
  156. package/plugins/runtime-modules/core/widgets/image/authoring.js +1 -1
  157. package/plugins/runtime-modules/core/widgets/image/editor.d.ts +1 -4
  158. package/plugins/runtime-modules/core/widgets/image/editor.js +2 -2
  159. package/plugins/runtime-modules/core/widgets/slot-upload/client.js +2 -3
  160. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +4 -25
  161. package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
  162. package/plugins/runtime-modules/preset-contracts/pub-area.js +0 -1
  163. package/plugins/runtime-modules/resolver.js +27 -1
  164. package/plugins/runtime-modules/settings.d.ts +20 -3
  165. package/plugins/runtime-modules/settings.js +35 -5
  166. package/plugins/runtime-modules/site-module-client-manifests.d.ts +2 -0
  167. package/plugins/runtime-modules/site-module-client-manifests.js +2 -0
  168. package/plugins/runtime-modules/site-modules-client.d.ts +5 -0
  169. package/plugins/runtime-modules/site-modules-client.js +1 -0
  170. package/plugins/runtime-modules/theme/brand-theme-model.js +0 -1
  171. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +97 -192
  172. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +6 -2
  173. package/runtime-client-manifests-accounting.d.ts +1 -1
  174. package/runtime-client-manifests-accounting.js +1 -1
  175. package/runtime-client-manifests-admin.d.ts +1 -1
  176. package/runtime-client-manifests-admin.js +1 -1
  177. package/runtime-client-manifests-app.d.ts +1 -1
  178. package/runtime-client-manifests-app.js +1 -1
  179. package/runtime-client-manifests-builder.d.ts +1 -1
  180. package/runtime-client-manifests-builder.js +1 -1
  181. package/runtime-client-manifests-editor.d.ts +1 -1
  182. package/runtime-client-manifests-editor.js +1 -1
  183. package/runtime-client-manifests-public.d.ts +2 -1
  184. package/runtime-client-manifests-public.js +1 -1
  185. package/runtime-media-source-client.d.ts +3 -0
  186. package/runtime-media-source-client.js +2 -0
  187. package/server-helpers/cms-request.js +10 -4
  188. package/theme/phi-theme-presets.d.ts +13 -3
  189. package/theme/phi-theme-presets.js +20 -3
  190. package/theme/phi-theme-seed-derivation.d.ts +240 -0
  191. package/theme/phi-theme-seed-derivation.js +126 -0
  192. package/types/cms-plugins.d.ts +29 -0
  193. package/types/media-source.d.ts +48 -0
  194. package/types/media-source.js +1 -0
  195. package/types/site-config.d.ts +1 -2
  196. package/types/site-theme.d.ts +0 -6
  197. package/types.d.ts +1 -0
  198. package/components/media/asset-controller-routes.d.ts +0 -8
  199. package/components/media/asset-controller-routes.js +0 -31
  200. package/helpers/brand-contact.d.ts +0 -14
  201. package/helpers/brand-contact.js +0 -26
package/types.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from "./types/layout-style";
14
14
  export * from "./types/control";
15
15
  export * from "./types/calendar";
16
16
  export * from "./types/calendar-keys";
17
+ export type * from "./types/media-source";
17
18
  export * from "./types/dimension";
18
19
  export * from "./types/length";
19
20
  export * from "./types/responsive";
@@ -1,8 +0,0 @@
1
- import { type PhiSignalRouteSet, type PhiSignalScope } from "../../types/signals";
2
- /**
3
- * The signal routes a media picker emits towards the asset controller.
4
- *
5
- * It sits beside the address and the channels it builds on, because it is used by the asset Module,
6
- * by the builder Module and by two shared widget components -- so no single Module can own it.
7
- */
8
- export declare function createPhiMediaPickerAssetControllerRoutes(routeKeyPrefix: string, scope: Extract<PhiSignalScope, "area" | "page">): PhiSignalRouteSet;
@@ -1,31 +0,0 @@
1
- import { PHI_SIGNAL_VALUE_SCHEMAS, } from "../../types/signals";
2
- import { createPhiAssetControllerAddress } from "./asset-controller-address";
3
- import { PHI_ASSET_SIGNAL_CHANNELS } from "./asset-controller-signals";
4
- /**
5
- * The signal routes a media picker emits towards the asset controller.
6
- *
7
- * It sits beside the address and the channels it builds on, because it is used by the asset Module,
8
- * by the builder Module and by two shared widget components -- so no single Module can own it.
9
- */
10
- export function createPhiMediaPickerAssetControllerRoutes(routeKeyPrefix, scope) {
11
- const receiver = createPhiAssetControllerAddress();
12
- return {
13
- emits: [
14
- { routeKey: `${routeKeyPrefix}-kind`, capabilityId: "kind", scope, channel: PHI_ASSET_SIGNAL_CHANNELS.kind, action: "change", valueType: "string", receiver },
15
- { routeKey: `${routeKeyPrefix}-presentationFlags`, capabilityId: "presentationFlags", scope, channel: PHI_ASSET_SIGNAL_CHANNELS.presentationFlags, action: "change", valueType: "number[]", receiver },
16
- { routeKey: `${routeKeyPrefix}-query`, capabilityId: "query", scope, channel: PHI_ASSET_SIGNAL_CHANNELS.query, action: "change", valueType: "string", receiver },
17
- { routeKey: `${routeKeyPrefix}-path`, capabilityId: "path", scope, channel: PHI_ASSET_SIGNAL_CHANNELS.path, action: "change", valueType: "path", receiver },
18
- { routeKey: `${routeKeyPrefix}-reload`, capabilityId: "reload", scope, channel: PHI_ASSET_SIGNAL_CHANNELS.reload, action: "activate", valueType: "none", receiver },
19
- {
20
- routeKey: `${routeKeyPrefix}-pagination`,
21
- capabilityId: "pagination",
22
- scope,
23
- channel: PHI_ASSET_SIGNAL_CHANNELS.pagination,
24
- action: "change",
25
- valueType: "json",
26
- valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.pagination,
27
- receiver,
28
- },
29
- ],
30
- };
31
- }
@@ -1,14 +0,0 @@
1
- import type { PhiBlockRuntime } from "../types";
2
- /**
3
- * The one way to reach whoever runs this Site.
4
- *
5
- * Two presets need it now -- the Area Shell, and the Public landing page, which draws its own header
6
- * and footer because no Shell is drawn around it. They have to agree: a landing page offering a
7
- * different address than the footer one click away is a bug the operator only hears about from a
8
- * customer.
9
- */
10
- export declare function resolvePhiBrandContact(runtime: PhiBlockRuntime): {
11
- label: string;
12
- href: string;
13
- icon: string;
14
- };
@@ -1,26 +0,0 @@
1
- function normalizeContactHost(hostname) {
2
- const normalized = hostname?.trim().toLowerCase();
3
- if (!normalized) {
4
- return undefined;
5
- }
6
- return normalized.replace(/^www\./, "");
7
- }
8
- /**
9
- * The one way to reach whoever runs this Site.
10
- *
11
- * Two presets need it now -- the Area Shell, and the Public landing page, which draws its own header
12
- * and footer because no Shell is drawn around it. They have to agree: a landing page offering a
13
- * different address than the footer one click away is a bug the operator only hears about from a
14
- * customer.
15
- */
16
- export function resolvePhiBrandContact(runtime) {
17
- return {
18
- label: runtime.site.theme?.contact?.label?.trim() || "Contact",
19
- href: runtime.site.theme?.contact?.href?.trim() ||
20
- (() => {
21
- const host = normalizeContactHost(runtime.site.hostname);
22
- return host ? `mailto:info@${host}` : "mailto:info@example.com";
23
- })(),
24
- icon: runtime.site.theme?.contact?.icon?.trim() || "antd:mail",
25
- };
26
- }