@phis/ui 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/cms/phi-cms-layout-renderer.js +4 -3
- package/components/cms/phi-cms-page-render-scope.d.ts +4 -5
- package/components/cms/phi-cms-page-render-scope.js +43 -22
- package/components/cms/phi-cms-render-diagnostic-client.js +7 -3
- package/components/cms/phi-cms-render-error-boundary.js +2 -1
- package/components/controls/phi-anchor-nav-control.js +4 -1
- package/components/controls/phi-background-control.js +21 -6
- package/components/controls/phi-bullet-list-control.d.ts +7 -2
- package/components/controls/phi-bullet-list-control.js +35 -5
- package/components/controls/phi-color-control.js +4 -2
- package/components/controls/phi-drawer-control-adapter.js +3 -2
- package/components/controls/phi-inline-text-editor.js +7 -1
- package/components/controls/phi-length-control.js +1 -1
- package/components/controls/phi-ribbon-control.d.ts +38 -0
- package/components/controls/phi-ribbon-control.js +57 -0
- package/components/controls/phi-ribbon-wrap-control.d.ts +26 -0
- package/components/controls/phi-ribbon-wrap-control.js +25 -0
- package/components/controls/phi-select-control.js +5 -2
- package/components/controls/phi-series-chart-control.d.ts +48 -0
- package/components/controls/phi-series-chart-control.js +82 -0
- package/components/controls/phi-table-control.d.ts +3 -0
- package/components/controls/phi-table-control.js +13 -1
- package/components/controls/phi-text-control.js +57 -3
- package/components/controls/phi-tree-control.js +4 -4
- package/components/controls/phi-truncated-hover-text.d.ts +15 -0
- package/components/controls/phi-truncated-hover-text.js +25 -0
- package/components/forms/link-target-form-control.d.ts +1 -1
- package/components/forms/link-target-form-control.js +2 -45
- package/components/forms/phi-form-widget-frame.js +4 -2
- package/components/forms/shared-form-provider-registry.js +1 -4
- package/components/layouts/clients/phi-three-column-layout-client.js +10 -1
- package/components/media/asset-collection-runtime.js +6 -16
- package/components/media/media-font-metrics.d.ts +3 -0
- package/components/media/media-font-metrics.js +43 -0
- package/components/media/phi-area-upload-widget.js +53 -97
- package/components/media/phi-image-preview-data.d.ts +13 -0
- package/components/media/phi-image-preview-data.js +184 -9
- package/components/media/phi-media-picker-binding.js +16 -13
- package/components/media/phi-media-upload.d.ts +15 -8
- package/components/media/phi-media-upload.js +18 -9
- package/components/media/phi-site-font-assets.js +7 -8
- package/components/navigation/phi-link.js +6 -1
- package/components/overlays/phi-overlay-container-client.js +16 -1
- package/components/regions/clients/cms-region-container-client.js +6 -1
- package/components/regions/phi-cms-region-container.js +3 -0
- package/components/regions/phi-cms-region-shell.d.ts +12 -1
- package/components/regions/phi-cms-region-shell.js +81 -19
- package/components/regions/presets/phi-settings-page-shell-tree.js +48 -1
- package/components/root/phi-config-provider.d.ts +13 -0
- package/components/root/phi-config-provider.js +12 -1
- package/components/root/phi-root-background.d.ts +7 -0
- package/components/root/phi-root-background.js +20 -1
- package/components/root/phi-root-theme-resolver.js +3 -0
- package/components/root/phi-shell-chrome-overlay.d.ts +12 -1
- package/components/root/phi-shell-chrome-overlay.js +19 -3
- package/components/runtime/runtime-controller-materialization.js +12 -1
- package/components/shell/phi-antd-icon.d.ts +1 -0
- package/components/shell/phi-antd-icon.js +3 -0
- package/components/shell/use-phi-shell-sticky-top.js +61 -16
- package/components/state/scoped-state-store.js +20 -3
- package/components/surface/phi-surface-tone.d.ts +13 -0
- package/components/surface/phi-surface-tone.js +21 -0
- package/components/tables/client/phi-table-binding.d.ts +2 -1
- package/components/tables/client/phi-table-binding.js +45 -21
- package/components/trees/client/phi-tree-binding.js +19 -11
- package/components/widgets/client/bullet-list-entries-editor.d.ts +26 -0
- package/components/widgets/client/bullet-list-entries-editor.js +109 -0
- package/components/widgets/client/html-editor.js +1 -1
- package/components/widgets/client/shared/use-page-reference-options.d.ts +17 -0
- package/components/widgets/client/shared/use-page-reference-options.js +57 -0
- package/components/widgets/config/background.d.ts +32 -1
- package/components/widgets/config/background.js +41 -2
- package/components/widgets/config/choice-shared.js +12 -13
- package/components/widgets/config/command-buttons.d.ts +5 -1
- package/components/widgets/config/command-buttons.js +38 -81
- package/components/widgets/config/control-signal-config.d.ts +3 -1
- package/components/widgets/config/control-signal-config.js +19 -17
- package/components/widgets/config/image-source-parser.d.ts +1 -0
- package/components/widgets/config/image-source-parser.js +7 -8
- package/components/widgets/config/mask.d.ts +6 -1
- package/components/widgets/config/mask.js +24 -1
- package/components/widgets/config/parser-primitives.js +72 -0
- package/components/widgets/config/stack-tabs.d.ts +1 -1
- package/components/widgets/config/stack-tabs.js +2 -3
- package/components/widgets/config/strict-config-reader.d.ts +40 -0
- package/components/widgets/config/strict-config-reader.js +174 -0
- package/components/widgets/label-sets/background.js +2 -0
- package/components/widgets/label-sets/effects.js +2 -0
- package/components/widgets/label-types/background.d.ts +1 -0
- package/components/widgets/label-types/background.js +1 -0
- package/components/widgets/label-types/effects.d.ts +1 -0
- package/components/widgets/label-types/effects.js +1 -0
- package/components/widgets/navigation-descriptor-resolver.server.js +20 -8
- package/components/widgets/shared/bullet-list-vocabulary.d.ts +27 -1
- package/components/widgets/shared/bullet-list-vocabulary.js +24 -4
- package/components/widgets/shared/card-body-client.d.ts +18 -4
- package/components/widgets/shared/card-body-client.js +126 -26
- package/components/widgets/shared/card-vocabulary.d.ts +31 -4
- package/components/widgets/shared/card-vocabulary.js +35 -2
- package/components/widgets/shared/markdown-body-client.js +39 -10
- package/components/widgets/signals/control-signal-capabilities.d.ts +0 -18
- package/components/widgets/signals/control-signal-capabilities.js +10 -22
- package/components/workspace/catalog-store.d.ts +4 -3
- package/components/workspace/catalog-store.js +6 -5
- package/gateway/dashboard-cards-route.js +1 -0
- package/gateway/internal-references.d.ts +6 -1
- package/gateway/internal-references.js +48 -23
- package/gateway/site-cms-write-validation.d.ts +9 -0
- package/gateway/site-cms-write-validation.js +78 -0
- package/gateway/site-proxy.js +19 -3
- package/helpers/cms-container-chrome.js +6 -1
- package/helpers/locale.d.ts +8 -0
- package/helpers/locale.js +18 -0
- package/helpers/renderable-block-serialization.js +1 -1
- package/helpers/shell-region-style.js +2 -1
- package/helpers/surface-style.d.ts +12 -1
- package/helpers/surface-style.js +28 -2
- package/module-dashboard-cards.d.ts +1 -1
- package/module-dashboard-cards.js +1 -1
- package/next/config.d.mts +3 -0
- package/next/config.mjs +28 -1
- package/package.json +2 -2
- package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +5 -1
- package/plugins/runtime-modules/accounting/presets.d.ts +9 -0
- package/plugins/runtime-modules/accounting/presets.js +37 -0
- package/plugins/runtime-modules/accounting/server.d.ts +1 -4
- package/plugins/runtime-modules/accounting/server.js +4 -7
- package/plugins/runtime-modules/app/presets.d.ts +18 -0
- package/plugins/runtime-modules/app/presets.js +67 -0
- package/plugins/runtime-modules/app/server.d.ts +1 -4
- package/plugins/runtime-modules/app/server.js +4 -7
- package/plugins/runtime-modules/area-definitions.d.ts +0 -42
- package/plugins/runtime-modules/area-definitions.js +3 -8
- package/plugins/runtime-modules/asset/controller/runtime.js +2 -2
- package/plugins/runtime-modules/asset/services/collection.js +9 -1
- package/plugins/runtime-modules/asset/services/options.js +2 -2
- package/plugins/runtime-modules/builder/area-settings-answer.js +2 -1
- package/plugins/runtime-modules/builder/authoring-canvas.js +6 -6
- package/plugins/runtime-modules/builder/cards.js +3 -5
- package/plugins/runtime-modules/builder/clients/builder-region-overrides.js +3 -3
- package/plugins/runtime-modules/builder/clients/canvas-widget.js +15 -54
- package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +4 -1
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +25 -35
- package/plugins/runtime-modules/builder/clients/inspector-link-target-field.js +1 -1
- package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +8 -8
- package/plugins/runtime-modules/builder/clients/inspector-title.js +6 -6
- package/plugins/runtime-modules/builder/clients/layout-inspector.d.ts +1 -1
- package/plugins/runtime-modules/builder/clients/layout-inspector.js +11 -25
- package/plugins/runtime-modules/builder/clients/layout-scaffold-overlays.js +10 -5
- package/plugins/runtime-modules/builder/clients/mode-switch.js +1 -1
- package/plugins/runtime-modules/builder/clients/pages-header.js +11 -11
- package/plugins/runtime-modules/builder/clients/pages-workspace.js +1 -1
- package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
- package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +1 -1
- package/plugins/runtime-modules/builder/clients/shells-workspace.js +15 -31
- package/plugins/runtime-modules/builder/clients/structure-canvas.js +1 -1
- package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.d.ts +26 -0
- package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.js +36 -0
- package/plugins/runtime-modules/builder/clients/widget-effects-editor.js +1 -1
- package/plugins/runtime-modules/builder/clients/widget-inspector.js +1 -0
- package/plugins/runtime-modules/builder/clients/workspace-scope-boundary.js +2 -2
- package/plugins/runtime-modules/builder/cms-instance-allocator.js +8 -28
- package/plugins/runtime-modules/builder/controller/client.d.ts +0 -15
- package/plugins/runtime-modules/builder/controller/definition.d.ts +0 -15
- package/plugins/runtime-modules/builder/controller/definition.js +0 -8
- package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +1 -2
- package/plugins/runtime-modules/builder/controller/draft-command-controller.js +11 -30
- package/plugins/runtime-modules/builder/controller/draft-status-controller.js +15 -2
- package/plugins/runtime-modules/builder/controller/inspector-controller.d.ts +1 -2
- package/plugins/runtime-modules/builder/controller/inspector-controller.js +4 -7
- package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -2
- package/plugins/runtime-modules/builder/controller/page-controller.js +16 -68
- package/plugins/runtime-modules/builder/controller/server-definition.d.ts +0 -15
- package/plugins/runtime-modules/builder/controller/signal-wiring-controller.d.ts +2 -5
- package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +6 -50
- package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +2 -3
- package/plugins/runtime-modules/builder/controller/workspace-controller.js +89 -153
- package/plugins/runtime-modules/builder/data-providers.d.ts +1 -0
- package/plugins/runtime-modules/builder/data-providers.js +1 -0
- package/plugins/runtime-modules/builder/definition.d.ts +1 -0
- package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +64 -30
- package/plugins/runtime-modules/builder/developer-workspace-store.js +255 -61
- package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +4 -3
- package/plugins/runtime-modules/builder/history.d.ts +3 -1
- package/plugins/runtime-modules/builder/options-providers.js +3 -2
- package/plugins/runtime-modules/builder/page-catalog-client.js +19 -7
- package/plugins/runtime-modules/builder/page-meta-form.js +1 -0
- package/plugins/runtime-modules/builder/page-references-provider.js +1 -1
- package/plugins/runtime-modules/builder/persistence.js +33 -69
- package/plugins/runtime-modules/builder/public-route-collisions.d.ts +2 -2
- package/plugins/runtime-modules/builder/public-route-collisions.js +6 -19
- package/plugins/runtime-modules/builder/render-root-node-preview.server.js +20 -3
- package/plugins/runtime-modules/builder/render-root-node-scaffold.js +28 -18
- package/plugins/runtime-modules/builder/runtime-module-selection.d.ts +2 -12
- package/plugins/runtime-modules/builder/runtime-module-selection.js +16 -42
- package/plugins/runtime-modules/builder/services/navigation-table.js +9 -15
- package/plugins/runtime-modules/builder/services/page-source-tree.js +8 -8
- package/plugins/runtime-modules/builder/services/runtime-modules-table.js +10 -10
- package/plugins/runtime-modules/builder/services/signal-routes-table.js +3 -3
- package/plugins/runtime-modules/builder/signal-route-selection.d.ts +1 -2
- package/plugins/runtime-modules/builder/signal-route-selection.js +2 -2
- package/plugins/runtime-modules/builder/signal-wiring-options.js +3 -2
- package/plugins/runtime-modules/builder/structure-dnd.js +8 -61
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +17 -10
- package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +27 -22
- package/plugins/runtime-modules/builder/workspace-catalog-actions.d.ts +55 -0
- package/plugins/runtime-modules/builder/workspace-catalog-actions.js +142 -0
- package/plugins/runtime-modules/client-authoring-module.d.ts +8 -1
- package/plugins/runtime-modules/client-authoring-module.js +13 -3
- package/plugins/runtime-modules/client-manifests/common.js +1 -1
- package/plugins/runtime-modules/{runtime-calendar-adapters.js → core/calendar-adapters.js} +2 -2
- package/plugins/runtime-modules/{client-calendar-adapters/core.js → core/client-calendar-adapters.js} +1 -1
- package/plugins/runtime-modules/core/content-entries/table.js +1 -1
- package/plugins/runtime-modules/core/data-providers.d.ts +3 -0
- package/plugins/runtime-modules/core/data-providers.js +2 -1
- package/plugins/runtime-modules/core/definition.d.ts +3 -0
- package/plugins/runtime-modules/core/definition.js +1 -1
- package/plugins/runtime-modules/core/messaging/data-providers.d.ts +1 -0
- package/plugins/runtime-modules/core/messaging/data-providers.js +1 -0
- package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +1 -1
- package/plugins/runtime-modules/core/server.js +1 -1
- package/plugins/runtime-modules/core/themes.d.ts +44 -0
- package/plugins/runtime-modules/core/themes.js +12 -0
- package/plugins/runtime-modules/core/widgets/brand/client.d.ts +12 -3
- package/plugins/runtime-modules/core/widgets/brand/client.js +3 -11
- package/plugins/runtime-modules/core/widgets/brand/home.d.ts +15 -0
- package/plugins/runtime-modules/core/widgets/brand/home.js +18 -0
- package/plugins/runtime-modules/core/widgets/brand/plugin.js +3 -2
- package/plugins/runtime-modules/core/widgets/brand/server.d.ts +2 -2
- package/plugins/runtime-modules/core/widgets/brand/server.js +2 -2
- package/plugins/runtime-modules/core/widgets/card/collection-view-binding.js +25 -9
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +301 -254
- package/plugins/runtime-modules/core/widgets/card/config.js +68 -3
- package/plugins/runtime-modules/core/widgets/card/editor.js +41 -4
- package/plugins/runtime-modules/core/widgets/card/server.d.ts +3 -0
- package/plugins/runtime-modules/core/widgets/card/server.js +32 -3
- package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +7 -6
- package/plugins/runtime-modules/core/widgets/collection-view/config.js +9 -2
- package/plugins/runtime-modules/core/widgets/description/client.js +3 -3
- package/plugins/runtime-modules/core/widgets/description/config.d.ts +2 -25
- package/plugins/runtime-modules/core/widgets/description/editor.js +7 -63
- package/plugins/runtime-modules/core/widgets/description/server.js +3 -2
- package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +2 -25
- package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +2 -25
- package/plugins/runtime-modules/core/widgets/header-navigation/client.js +2 -2
- package/plugins/runtime-modules/core/widgets/html/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/image/config.js +2 -2
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +320 -2
- package/plugins/runtime-modules/core/widgets/markdown/config.js +18 -4
- package/plugins/runtime-modules/core/widgets/markdown/editor.js +11 -4
- package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +6 -1
- package/plugins/runtime-modules/core/widgets/markdown-toc/config.d.ts +14 -0
- package/plugins/runtime-modules/core/widgets/markdown-toc/config.js +14 -2
- package/plugins/runtime-modules/core/widgets/quick-links/authoring.js +7 -2
- package/plugins/runtime-modules/core/widgets/quick-links/client.js +2 -2
- package/plugins/runtime-modules/core/widgets/quick-links/items.d.ts +0 -2
- package/plugins/runtime-modules/core/widgets/quick-links/items.js +0 -15
- package/plugins/runtime-modules/core/widgets/result/config.d.ts +5 -25
- package/plugins/runtime-modules/core/widgets/result/config.js +2 -0
- package/plugins/runtime-modules/core/widgets/result/server.js +25 -19
- package/plugins/runtime-modules/core/widgets/sidebar-navigation/authoring.js +1 -1
- package/plugins/runtime-modules/core/widgets/sidebar-navigation/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/simple-text/client.js +8 -3
- package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +2 -25
- package/plugins/runtime-modules/core/widgets/simple-text/editor.js +2 -2
- package/plugins/runtime-modules/core/widgets/slot-upload/client.js +11 -2
- package/plugins/runtime-modules/core/widgets/table/client.js +8 -4
- package/plugins/runtime-modules/core/widgets/table/config.d.ts +6 -83
- package/plugins/runtime-modules/core/widgets/table/config.js +302 -452
- package/plugins/runtime-modules/core/widgets/tree/config.js +5 -2
- package/plugins/runtime-modules/dashboard/card-rows.d.ts +7 -0
- package/plugins/runtime-modules/dashboard/card-rows.js +87 -0
- package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +32 -12
- package/plugins/runtime-modules/dashboard/services/collection.js +17 -7
- package/plugins/runtime-modules/dashboard/trees/phi-default-builder-dashboard-page-tree.js +5 -40
- package/plugins/runtime-modules/groups/data-providers.d.ts +2 -0
- package/plugins/runtime-modules/groups/data-providers.js +3 -3
- package/plugins/runtime-modules/groups/definition.d.ts +2 -0
- package/plugins/runtime-modules/localization/data-providers.d.ts +3 -0
- package/plugins/runtime-modules/localization/data-providers.js +2 -0
- package/plugins/runtime-modules/localization/definition.d.ts +3 -0
- package/plugins/runtime-modules/localization/services/table.js +3 -7
- package/plugins/runtime-modules/observability/data-providers.d.ts +1 -0
- package/plugins/runtime-modules/observability/data-providers.js +1 -0
- package/plugins/runtime-modules/observability/definition.d.ts +1 -0
- package/plugins/runtime-modules/observability/module.d.ts +1 -0
- package/plugins/runtime-modules/observability/services/table.js +1 -1
- package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +2 -105
- package/plugins/runtime-modules/public/presets.d.ts +115 -0
- package/plugins/runtime-modules/{area-base-presets.js → public/presets.js} +19 -119
- package/plugins/runtime-modules/public/server.d.ts +1 -4
- package/plugins/runtime-modules/public/server.js +4 -7
- package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +7 -8
- package/plugins/runtime-modules/public-base-page-references.d.ts +1 -1
- package/plugins/runtime-modules/public-base-page-references.js +1 -1
- package/plugins/runtime-modules/revisions/controller/client.js +11 -11
- package/plugins/runtime-modules/revisions/services/table.js +3 -3
- package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +22 -0
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.d.ts +2 -1
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +111 -72
- package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +2 -1
- package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +28 -31
- package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +1 -1
- package/plugins/runtime-modules/theme-descriptors.js +1 -1
- package/plugins/runtime-modules/user-management/data-providers.d.ts +2 -0
- package/plugins/runtime-modules/user-management/data-providers.js +1 -0
- package/plugins/runtime-modules/user-management/definition.d.ts +2 -0
- package/server-helpers/cms-link-targets.js +6 -0
- package/styles/control-shape.css +11 -11
- package/styles/controls.css +67 -5
- package/styles/layout.css +61 -9
- package/styles/shell.css +73 -0
- package/theme/phi-antd-token-resolver.js +20 -1
- package/theme/phi-theme-tokens.d.ts +1 -1
- package/theme/phi-theme-tokens.js +1 -0
- package/theme/phi-theme.d.ts +5 -0
- package/theme/phi-theme.js +21 -0
- package/theme/phi-tokens.d.ts +16 -15
- package/theme/phi-tokens.js +16 -15
- package/types/cms-config.js +142 -185
- package/types/cms-plugins.d.ts +6 -11
- package/types/core-widget-placements.d.ts +14 -3
- package/types/dashboard-cards.d.ts +48 -4
- package/types/dashboard-cards.js +6 -0
- package/types/media.d.ts +0 -3
- package/types/renderable-block.d.ts +6 -1
- package/types/site-theme.d.ts +10 -2
- package/types/table-widget.d.ts +9 -0
- package/types/table-widget.js +20 -0
- package/types.d.ts +1 -1
- package/widget-config.d.ts +2 -0
- package/widget-config.js +6 -0
- package/plugins/runtime-modules/area-base-presets.d.ts +0 -139
- /package/plugins/runtime-modules/{runtime-calendar-adapters.d.ts → core/calendar-adapters.d.ts} +0 -0
- /package/plugins/runtime-modules/{client-calendar-adapters/core.d.ts → core/client-calendar-adapters.d.ts} +0 -0
|
@@ -45,6 +45,7 @@ export declare const PHI_GALLERY_WIDGET_DEFINITION: {
|
|
|
45
45
|
} & {
|
|
46
46
|
type: "string" | "url" | "icon";
|
|
47
47
|
emptyValue?: "";
|
|
48
|
+
placeholder?: string;
|
|
48
49
|
}) | ({
|
|
49
50
|
key: string;
|
|
50
51
|
label: string;
|
|
@@ -318,30 +319,6 @@ export declare const PHI_GALLERY_WIDGET_DEFINITION: {
|
|
|
318
319
|
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
319
320
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
320
321
|
heading?: string;
|
|
321
|
-
} & {
|
|
322
|
-
type: "background";
|
|
323
|
-
section?: string;
|
|
324
|
-
storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
|
|
325
|
-
}) | ({
|
|
326
|
-
key: string;
|
|
327
|
-
label: string;
|
|
328
|
-
description?: string;
|
|
329
|
-
required?: boolean;
|
|
330
|
-
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
331
|
-
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
332
|
-
heading?: string;
|
|
333
|
-
} & {
|
|
334
|
-
type: "border";
|
|
335
|
-
section?: string;
|
|
336
|
-
storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
|
|
337
|
-
}) | ({
|
|
338
|
-
key: string;
|
|
339
|
-
label: string;
|
|
340
|
-
description?: string;
|
|
341
|
-
required?: boolean;
|
|
342
|
-
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
343
|
-
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
344
|
-
heading?: string;
|
|
345
322
|
} & {
|
|
346
323
|
type: "surface";
|
|
347
324
|
tone?: false;
|
|
@@ -354,7 +331,7 @@ export declare const PHI_GALLERY_WIDGET_DEFINITION: {
|
|
|
354
331
|
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
355
332
|
heading?: string;
|
|
356
333
|
} & {
|
|
357
|
-
type: "
|
|
334
|
+
type: "grid-placement" | "column-count";
|
|
358
335
|
section?: string;
|
|
359
336
|
}) | {
|
|
360
337
|
key: string;
|
|
@@ -28,7 +28,7 @@ export function PhiHeaderNavigationWidgetClient({ runtime, items, menuTheme, hei
|
|
|
28
28
|
minHeight: 0,
|
|
29
29
|
overflow: "hidden",
|
|
30
30
|
whiteSpace: "nowrap",
|
|
31
|
-
fontSize: token.
|
|
31
|
+
fontSize: token.fontSize,
|
|
32
32
|
}, children: items.map((item) => (_jsx("span", { style: {
|
|
33
33
|
display: "inline-flex",
|
|
34
34
|
alignItems: "center",
|
|
@@ -46,7 +46,7 @@ export function PhiHeaderNavigationWidgetClient({ runtime, items, menuTheme, hei
|
|
|
46
46
|
minHeight: 0,
|
|
47
47
|
flex: 1,
|
|
48
48
|
justifyContent: align === "center" ? "center" : "flex-start",
|
|
49
|
-
}, children: _jsx(PhiMenuControl, { mode: "horizontal", menuTheme: menuTheme, selectedKeys: selectedKeys, items: menuItems, fontSize: token.
|
|
49
|
+
}, children: _jsx(PhiMenuControl, { mode: "horizontal", menuTheme: menuTheme, selectedKeys: selectedKeys, items: menuItems, fontSize: token.fontSize, style: {
|
|
50
50
|
display: "flex",
|
|
51
51
|
alignItems: "center",
|
|
52
52
|
justifyContent: align === "center" ? "center" : "flex-start",
|
|
@@ -11,7 +11,7 @@ export function PhiHtmlWidgetClient({ blockId, config, }) {
|
|
|
11
11
|
const [fontSizeOverride, setFontSizeOverride] = useState(null);
|
|
12
12
|
const html = typeof config?.html === "string" ? config.html.trim() : "";
|
|
13
13
|
const resolvedFontFamily = resolvePhiWidgetFontFamily(fontFamilyOverride ?? config?.fontFamily, fonts, token);
|
|
14
|
-
const resolvedFontSize = resolvePhiWidgetFontSize(fontSizeOverride ?? config?.fontSize, token, "
|
|
14
|
+
const resolvedFontSize = resolvePhiWidgetFontSize(fontSizeOverride ?? config?.fontSize, token, "base");
|
|
15
15
|
const receiver = createPhiRenderableBlockReceiver("widget", blockId);
|
|
16
16
|
usePhiRenderableBlockSignalListener(receiver, (signal) => {
|
|
17
17
|
if (signal.channel === "fontFamily" && signal.action === "change") {
|
|
@@ -5,7 +5,7 @@ import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
|
|
|
5
5
|
import { PhiImageAssetVariantKey } from "../../../../../constants/media";
|
|
6
6
|
import { readPhiMediaImageSourceConfig } from "../../../../../components/widgets/config/image-source-parser";
|
|
7
7
|
import { readBoolean, readCssSize, readRenderableBlockConfig, readString, } from "../../../../../components/widgets/config/parser-primitives";
|
|
8
|
-
import {
|
|
8
|
+
import { readPhiMaskConfig, } from "../../../../../components/widgets/config/mask";
|
|
9
9
|
function readImageSize(value) {
|
|
10
10
|
if (!isPhiRecord(value)) {
|
|
11
11
|
return undefined;
|
|
@@ -64,7 +64,7 @@ export function normalizePhiImageWidgetConfig(config) {
|
|
|
64
64
|
borderTopRightRadius: readCssSize(raw.borderTopRightRadius),
|
|
65
65
|
borderBottomLeftRadius: readCssSize(raw.borderBottomLeftRadius),
|
|
66
66
|
borderBottomRightRadius: readCssSize(raw.borderBottomRightRadius),
|
|
67
|
-
mask:
|
|
67
|
+
mask: readPhiMaskConfig(raw.mask),
|
|
68
68
|
};
|
|
69
69
|
/*
|
|
70
70
|
* An Asset without a word about its variant gets the Card variant; `null` is a word -- the Inspector's
|
|
@@ -44,8 +44,15 @@ export declare const PHI_MARKDOWN_WIDGET_DEFINITION: {
|
|
|
44
44
|
textAlign: "start";
|
|
45
45
|
textBlockSpacingBefore: "none";
|
|
46
46
|
textBlockSpacingAfter: "sm";
|
|
47
|
-
headingBlockSpacingBefore: "
|
|
47
|
+
headingBlockSpacingBefore: "sm";
|
|
48
48
|
headingBlockSpacingAfter: "sm";
|
|
49
|
+
headingOffset: number;
|
|
50
|
+
list: {
|
|
51
|
+
level1: "dot";
|
|
52
|
+
level2: "circle";
|
|
53
|
+
level3: "dash";
|
|
54
|
+
gap: "xs";
|
|
55
|
+
};
|
|
49
56
|
};
|
|
50
57
|
contentBinding: {
|
|
51
58
|
storage: "markdown";
|
|
@@ -57,7 +64,318 @@ export declare const PHI_MARKDOWN_WIDGET_DEFINITION: {
|
|
|
57
64
|
value: string;
|
|
58
65
|
};
|
|
59
66
|
};
|
|
60
|
-
fields:
|
|
67
|
+
fields: (({
|
|
68
|
+
key: string;
|
|
69
|
+
label: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
required?: boolean;
|
|
72
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
73
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
74
|
+
heading?: string;
|
|
75
|
+
} & {
|
|
76
|
+
type: "string" | "url" | "icon";
|
|
77
|
+
emptyValue?: "";
|
|
78
|
+
placeholder?: string;
|
|
79
|
+
}) | ({
|
|
80
|
+
key: string;
|
|
81
|
+
label: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
required?: boolean;
|
|
84
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
85
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
86
|
+
heading?: string;
|
|
87
|
+
} & {
|
|
88
|
+
type: "link-target";
|
|
89
|
+
clearsWhenEmpty?: readonly string[];
|
|
90
|
+
}) | ({
|
|
91
|
+
key: string;
|
|
92
|
+
label: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
required?: boolean;
|
|
95
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
96
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
97
|
+
heading?: string;
|
|
98
|
+
} & {
|
|
99
|
+
type: "readonly";
|
|
100
|
+
}) | ({
|
|
101
|
+
key: string;
|
|
102
|
+
label: string;
|
|
103
|
+
description?: string;
|
|
104
|
+
required?: boolean;
|
|
105
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
106
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
107
|
+
heading?: string;
|
|
108
|
+
} & {
|
|
109
|
+
type: "data-provider";
|
|
110
|
+
providerKind?: import("../../../../../types").PhiRuntimeDataProviderKind;
|
|
111
|
+
providerKey?: import("@phis/contracts/controls").PhiRuntimeDataProviderKey;
|
|
112
|
+
}) | ({
|
|
113
|
+
key: string;
|
|
114
|
+
label: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
required?: boolean;
|
|
117
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
118
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
119
|
+
heading?: string;
|
|
120
|
+
} & {
|
|
121
|
+
type: "calendar-adapter";
|
|
122
|
+
}) | ({
|
|
123
|
+
key: string;
|
|
124
|
+
label: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
required?: boolean;
|
|
127
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
128
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
129
|
+
heading?: string;
|
|
130
|
+
} & {
|
|
131
|
+
type: "video-provider";
|
|
132
|
+
}) | ({
|
|
133
|
+
key: string;
|
|
134
|
+
label: string;
|
|
135
|
+
description?: string;
|
|
136
|
+
required?: boolean;
|
|
137
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
138
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
139
|
+
heading?: string;
|
|
140
|
+
} & {
|
|
141
|
+
type: "dimension";
|
|
142
|
+
widthKey?: string;
|
|
143
|
+
heightKey?: string;
|
|
144
|
+
widthPlaceholder?: string;
|
|
145
|
+
heightPlaceholder?: string;
|
|
146
|
+
patchOnChange?: Record<string, unknown>;
|
|
147
|
+
}) | ({
|
|
148
|
+
key: string;
|
|
149
|
+
label: string;
|
|
150
|
+
description?: string;
|
|
151
|
+
required?: boolean;
|
|
152
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
153
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
154
|
+
heading?: string;
|
|
155
|
+
} & {
|
|
156
|
+
type: "length";
|
|
157
|
+
min?: number;
|
|
158
|
+
max?: number;
|
|
159
|
+
step?: number;
|
|
160
|
+
precision?: number;
|
|
161
|
+
}) | ({
|
|
162
|
+
key: string;
|
|
163
|
+
label: string;
|
|
164
|
+
description?: string;
|
|
165
|
+
required?: boolean;
|
|
166
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
167
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
168
|
+
heading?: string;
|
|
169
|
+
} & {
|
|
170
|
+
type: "radius";
|
|
171
|
+
topLeftKey: string;
|
|
172
|
+
topRightKey: string;
|
|
173
|
+
bottomLeftKey: string;
|
|
174
|
+
bottomRightKey: string;
|
|
175
|
+
}) | ({
|
|
176
|
+
key: string;
|
|
177
|
+
label: string;
|
|
178
|
+
description?: string;
|
|
179
|
+
required?: boolean;
|
|
180
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
181
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
182
|
+
heading?: string;
|
|
183
|
+
} & {
|
|
184
|
+
type: "padding";
|
|
185
|
+
paddingKey?: string;
|
|
186
|
+
gapKey?: string;
|
|
187
|
+
paddingTopKey?: string;
|
|
188
|
+
paddingRightKey?: string;
|
|
189
|
+
paddingBottomKey?: string;
|
|
190
|
+
paddingLeftKey?: string;
|
|
191
|
+
section?: string;
|
|
192
|
+
}) | ({
|
|
193
|
+
key: string;
|
|
194
|
+
label: string;
|
|
195
|
+
description?: string;
|
|
196
|
+
required?: boolean;
|
|
197
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
198
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
199
|
+
heading?: string;
|
|
200
|
+
} & {
|
|
201
|
+
type: "color";
|
|
202
|
+
mode?: import("../../../../../types").PhiCmsConfigFieldColorMode;
|
|
203
|
+
defaultToken?: import("../../../../../theme/phi-theme-tokens").PhiThemeTokenKey;
|
|
204
|
+
section?: string;
|
|
205
|
+
}) | ({
|
|
206
|
+
key: string;
|
|
207
|
+
label: string;
|
|
208
|
+
description?: string;
|
|
209
|
+
required?: boolean;
|
|
210
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
211
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
212
|
+
heading?: string;
|
|
213
|
+
} & {
|
|
214
|
+
type: "boolean";
|
|
215
|
+
}) | ({
|
|
216
|
+
key: string;
|
|
217
|
+
label: string;
|
|
218
|
+
description?: string;
|
|
219
|
+
required?: boolean;
|
|
220
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
221
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
222
|
+
heading?: string;
|
|
223
|
+
} & {
|
|
224
|
+
type: "image";
|
|
225
|
+
}) | ({
|
|
226
|
+
key: string;
|
|
227
|
+
label: string;
|
|
228
|
+
description?: string;
|
|
229
|
+
required?: boolean;
|
|
230
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
231
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
232
|
+
heading?: string;
|
|
233
|
+
} & {
|
|
234
|
+
type: "slot-texts";
|
|
235
|
+
}) | ({
|
|
236
|
+
key: string;
|
|
237
|
+
label: string;
|
|
238
|
+
description?: string;
|
|
239
|
+
required?: boolean;
|
|
240
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
241
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
242
|
+
heading?: string;
|
|
243
|
+
} & {
|
|
244
|
+
type: "number-list";
|
|
245
|
+
min?: number;
|
|
246
|
+
}) | ({
|
|
247
|
+
key: string;
|
|
248
|
+
label: string;
|
|
249
|
+
description?: string;
|
|
250
|
+
required?: boolean;
|
|
251
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
252
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
253
|
+
heading?: string;
|
|
254
|
+
} & {
|
|
255
|
+
type: "flags";
|
|
256
|
+
options: readonly {
|
|
257
|
+
value: number;
|
|
258
|
+
label: string;
|
|
259
|
+
}[];
|
|
260
|
+
}) | ({
|
|
261
|
+
key: string;
|
|
262
|
+
label: string;
|
|
263
|
+
description?: string;
|
|
264
|
+
required?: boolean;
|
|
265
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
266
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
267
|
+
heading?: string;
|
|
268
|
+
} & {
|
|
269
|
+
type: "number";
|
|
270
|
+
min?: number;
|
|
271
|
+
max?: number;
|
|
272
|
+
step?: number;
|
|
273
|
+
precision?: number;
|
|
274
|
+
prefix?: string;
|
|
275
|
+
presentation?: "slider";
|
|
276
|
+
suffix?: string;
|
|
277
|
+
}) | ({
|
|
278
|
+
key: string;
|
|
279
|
+
label: string;
|
|
280
|
+
description?: string;
|
|
281
|
+
required?: boolean;
|
|
282
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
283
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
284
|
+
heading?: string;
|
|
285
|
+
} & {
|
|
286
|
+
type: "choice";
|
|
287
|
+
valueType: "number";
|
|
288
|
+
options: import("@phis/contracts/controls").PhiControlOption<number>[];
|
|
289
|
+
emptyOption?: import("@phis/contracts/controls").PhiControlOption;
|
|
290
|
+
emptyValue?: null | undefined;
|
|
291
|
+
placeholder?: string;
|
|
292
|
+
mode?: never;
|
|
293
|
+
presentation?: never;
|
|
294
|
+
optionsProvider?: never;
|
|
295
|
+
allowCustom?: never;
|
|
296
|
+
createBehavior?: never;
|
|
297
|
+
filter?: never;
|
|
298
|
+
patchOnChange?: never;
|
|
299
|
+
optionPresets?: never;
|
|
300
|
+
}) | ({
|
|
301
|
+
key: string;
|
|
302
|
+
label: string;
|
|
303
|
+
description?: string;
|
|
304
|
+
required?: boolean;
|
|
305
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
306
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
307
|
+
heading?: string;
|
|
308
|
+
} & {
|
|
309
|
+
type: "choice";
|
|
310
|
+
mode?: import("../../../../../types").PhiCmsConfigFieldChoiceMode;
|
|
311
|
+
valueType?: Exclude<import("../../../../../types").PhiCmsConfigFieldChoiceValueType, "number">;
|
|
312
|
+
presentation?: import("../../../../../types").PhiCmsConfigFieldChoicePresentation;
|
|
313
|
+
options?: import("@phis/contracts/controls").PhiControlOption[];
|
|
314
|
+
optionsProvider?: import("@phis/contracts/controls").PhiControlOptionsProviderConfig;
|
|
315
|
+
allowCustom?: boolean;
|
|
316
|
+
createBehavior?: import("../../../../../types").PhiCmsConfigFieldChoiceCreateBehavior;
|
|
317
|
+
placeholder?: string;
|
|
318
|
+
filter?: import("../../../../../types").PhiCmsConfigFieldChoiceFilter;
|
|
319
|
+
emptyOption?: import("@phis/contracts/controls").PhiControlOption;
|
|
320
|
+
emptyValue?: null | undefined;
|
|
321
|
+
patchOnChange?: Record<string, unknown>;
|
|
322
|
+
optionPresets?: import("../../../../../types/cms-plugins").PhiCmsConfigFieldOptionPresets;
|
|
323
|
+
}) | ({
|
|
324
|
+
key: string;
|
|
325
|
+
label: string;
|
|
326
|
+
description?: string;
|
|
327
|
+
required?: boolean;
|
|
328
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
329
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
330
|
+
heading?: string;
|
|
331
|
+
} & {
|
|
332
|
+
type: "collection";
|
|
333
|
+
itemKeyField: string;
|
|
334
|
+
itemLabelField?: string;
|
|
335
|
+
itemFields: import("../../../../../types").PhiCmsConfigField[];
|
|
336
|
+
defaultItem?: Record<string, unknown>;
|
|
337
|
+
addLabel?: string;
|
|
338
|
+
emptyLabel?: string;
|
|
339
|
+
minItems?: number;
|
|
340
|
+
maxItems?: number;
|
|
341
|
+
reorderable?: boolean;
|
|
342
|
+
presentation?: import("../../../../../types").PhiCmsConfigFieldCollectionPresentation;
|
|
343
|
+
editLabel?: string;
|
|
344
|
+
}) | ({
|
|
345
|
+
key: string;
|
|
346
|
+
label: string;
|
|
347
|
+
description?: string;
|
|
348
|
+
required?: boolean;
|
|
349
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
350
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
351
|
+
heading?: string;
|
|
352
|
+
} & {
|
|
353
|
+
type: "surface";
|
|
354
|
+
tone?: false;
|
|
355
|
+
}) | ({
|
|
356
|
+
key: string;
|
|
357
|
+
label: string;
|
|
358
|
+
description?: string;
|
|
359
|
+
required?: boolean;
|
|
360
|
+
editorPlacement?: "inspector" | "geometry" | "toolbar";
|
|
361
|
+
visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
|
|
362
|
+
heading?: string;
|
|
363
|
+
} & {
|
|
364
|
+
type: "grid-placement" | "column-count";
|
|
365
|
+
section?: string;
|
|
366
|
+
}) | {
|
|
367
|
+
key: string;
|
|
368
|
+
type: "choice";
|
|
369
|
+
label: string;
|
|
370
|
+
emptyOption: {
|
|
371
|
+
value: string;
|
|
372
|
+
label: string;
|
|
373
|
+
};
|
|
374
|
+
options: {
|
|
375
|
+
value: PhiMarkdownImageFloat;
|
|
376
|
+
label: string;
|
|
377
|
+
}[];
|
|
378
|
+
})[];
|
|
61
379
|
parseConfig: typeof parsePhiCmsMarkdownWidgetConfig;
|
|
62
380
|
};
|
|
63
381
|
export declare const PHI_MARKDOWN_WIDGET_PLUGIN_TYPE: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolvePhiCmsWidgetPluginKey } from "../../../../../constants/cms-widget-types";
|
|
2
2
|
import { PHI_SPACING_SCALE_KEYS } from "../../../../../components/widgets/config/spacing-options";
|
|
3
3
|
import { PhiCmsWidgetType } from "../../../../../constants/cms-widget-types";
|
|
4
|
-
import { buildPhiBulletListFields, readPhiBulletListStyle, } from "../../../../../components/widgets/shared/bullet-list-vocabulary";
|
|
4
|
+
import { buildPhiBulletListFields, PHI_BULLET_LIST_DEFAULT_STYLE, readPhiBulletListStyle, } from "../../../../../components/widgets/shared/bullet-list-vocabulary";
|
|
5
5
|
import { readNumber, readRenderableBlockConfig, readString, } from "../../../../../components/widgets/config/parser-primitives";
|
|
6
6
|
const PHI_MARKDOWN_TEXT_ALIGN_OPTIONS = [
|
|
7
7
|
{ value: "start", label: "Start" },
|
|
@@ -81,8 +81,11 @@ export const PHI_MARKDOWN_WIDGET_DEFINITION = {
|
|
|
81
81
|
textAlign: "start",
|
|
82
82
|
textBlockSpacingBefore: "none",
|
|
83
83
|
textBlockSpacingAfter: "sm",
|
|
84
|
-
headingBlockSpacingBefore: "
|
|
84
|
+
headingBlockSpacingBefore: "sm",
|
|
85
85
|
headingBlockSpacingAfter: "sm",
|
|
86
|
+
headingOffset: 0,
|
|
87
|
+
// What the list draws with when nothing is set, so the Inspector shows it rather than empty fields.
|
|
88
|
+
list: { ...PHI_BULLET_LIST_DEFAULT_STYLE },
|
|
86
89
|
},
|
|
87
90
|
contentBinding: {
|
|
88
91
|
storage: "markdown",
|
|
@@ -127,6 +130,8 @@ export const PHI_MARKDOWN_WIDGET_DEFINITION = {
|
|
|
127
130
|
key: "imageFloat",
|
|
128
131
|
type: "choice",
|
|
129
132
|
label: "Image Float",
|
|
133
|
+
// No float is the default and stores nothing; the line says so instead of an empty picker.
|
|
134
|
+
emptyOption: { value: "none", label: "None" },
|
|
130
135
|
options: PHI_MARKDOWN_IMAGE_FLOAT_OPTIONS,
|
|
131
136
|
},
|
|
132
137
|
{
|
|
@@ -157,12 +162,21 @@ export const PHI_MARKDOWN_WIDGET_DEFINITION = {
|
|
|
157
162
|
key: "headingOffset",
|
|
158
163
|
type: "number",
|
|
159
164
|
label: "Heading Offset",
|
|
165
|
+
description: "Moves every heading of the text down by this many levels: at 1, a # heading is drawn as H2, ## as H3, and so on. For a text that stands under a page title of its own, so its first heading does not compete with it.",
|
|
160
166
|
min: 0,
|
|
161
167
|
max: PHI_MARKDOWN_HEADING_OFFSET_MAX,
|
|
162
168
|
precision: 0,
|
|
163
169
|
},
|
|
164
|
-
{
|
|
165
|
-
|
|
170
|
+
{
|
|
171
|
+
key: "tocKey",
|
|
172
|
+
type: "string",
|
|
173
|
+
label: "TOC Key",
|
|
174
|
+
// Empty is no key, and a TOC on "Auto" connects to the text all the same.
|
|
175
|
+
placeholder: "Auto",
|
|
176
|
+
description: "A name for this text's table of contents. A Markdown TOC widget set to Binding Mode \"Target\" with the same TOC Key lists this text's headings and no other's. Leave it empty while the page has one Markdown text: a TOC on \"Auto\" finds it by itself.",
|
|
177
|
+
},
|
|
178
|
+
// The markers are an unordered list's: a `1.` list counts, whatever its level's marker says.
|
|
179
|
+
...buildPhiBulletListFields("list", "Unordered Lists"),
|
|
166
180
|
],
|
|
167
181
|
parseConfig: parsePhiCmsMarkdownWidgetConfig,
|
|
168
182
|
};
|
|
@@ -69,7 +69,15 @@ export function PhiMarkdownWidgetEditor({ blockId, config, onChange, onSourceLoc
|
|
|
69
69
|
* On the field's own text, not on `style`: `style` places the control as a whole, and with a clear
|
|
70
70
|
* button the control is a wrapper around the textarea, which is where the text is.
|
|
71
71
|
*/
|
|
72
|
-
inputStyle:
|
|
72
|
+
inputStyle: {
|
|
73
|
+
...(config?.textAlign ? { textAlign: config.textAlign } : {}),
|
|
74
|
+
/*
|
|
75
|
+
* The text's own padding, stated, as a single-line field's would be: half of what the first line
|
|
76
|
+
* leaves of a control's height. Stated, the clear button finds the first line by it, as it does in
|
|
77
|
+
* every field that states one; left to Ant Design it hung at its own offset, half a line above.
|
|
78
|
+
*/
|
|
79
|
+
paddingBlock: "calc((var(--ant-control-height) - 1lh) / 2)",
|
|
80
|
+
}, style: {
|
|
73
81
|
/*
|
|
74
82
|
* As wide as the slot: the Widget fills its inline axis (`fill-inline`), so the frame decides the
|
|
75
83
|
* width and the editor takes it. A fixed 520px here dated from when the Widget was intrinsic and
|
|
@@ -92,10 +100,9 @@ export function PhiMarkdownWidgetEditor({ blockId, config, onChange, onSourceLoc
|
|
|
92
100
|
* as a capsule.
|
|
93
101
|
*
|
|
94
102
|
* `grown-md` is what that stylesheet would have given it -- the capsule of one Control line,
|
|
95
|
-
* held at every height (THEME.md, "Control shape").
|
|
96
|
-
* because it is the one radius on this element that a component token does not redefine.
|
|
103
|
+
* held at every height (THEME.md, "Control shape").
|
|
97
104
|
*/
|
|
98
|
-
borderRadius: "var(--phi-control-radius-grown-md
|
|
105
|
+
borderRadius: "var(--phi-control-radius-grown-md)",
|
|
99
106
|
background: "var(--ant-color-bg-container)",
|
|
100
107
|
resize: "none",
|
|
101
108
|
fontFamily: "var(--ant-font-family-code, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace)",
|
|
@@ -6,11 +6,16 @@ import { usePhiConfig } from "../../../../../components/root/phi-config-provider
|
|
|
6
6
|
import { PhiAnchorNavControl } from "../../../../../components/controls/phi-anchor-nav-control";
|
|
7
7
|
import { PhiEmptyControl } from "../../../../../components/controls/phi-empty-control";
|
|
8
8
|
import { PhiTypographyControl } from "../../../../../components/controls/phi-typography-control";
|
|
9
|
+
/*
|
|
10
|
+
* Indented by depth below the shallowest heading listed, not below `h1`: a contents that starts at `h3`
|
|
11
|
+
* (a document whose headings moved down under a page title) would otherwise stand two steps off its line.
|
|
12
|
+
*/
|
|
9
13
|
function buildAnchorItems(headings, indent) {
|
|
14
|
+
const topLevel = headings.reduce((lowest, heading) => Math.min(lowest, heading.level), Infinity);
|
|
10
15
|
return headings.map((heading) => ({
|
|
11
16
|
key: heading.id,
|
|
12
17
|
href: `#${heading.id}`,
|
|
13
|
-
title: (_jsx("span", { style: { display: "block", paddingInlineStart: (heading.level -
|
|
18
|
+
title: (_jsx("span", { style: { display: "block", paddingInlineStart: (heading.level - topLevel) * indent, minWidth: 0 }, children: _jsx(PhiTypographyControl, { ellipsis: { tooltip: heading.text }, style: { display: "block", color: "inherit", fontSize: "inherit", lineHeight: "inherit" }, children: heading.text }) })),
|
|
14
19
|
}));
|
|
15
20
|
}
|
|
16
21
|
function filterHeadings(headings, config) {
|
|
@@ -39,9 +39,11 @@ export declare const PHI_MARKDOWN_TOC_WIDGET_DEFINITION: {
|
|
|
39
39
|
filter?: undefined;
|
|
40
40
|
placeholder?: undefined;
|
|
41
41
|
visibleWhen?: undefined;
|
|
42
|
+
description?: undefined;
|
|
42
43
|
min?: undefined;
|
|
43
44
|
max?: undefined;
|
|
44
45
|
precision?: undefined;
|
|
46
|
+
prefix?: undefined;
|
|
45
47
|
} | {
|
|
46
48
|
key: string;
|
|
47
49
|
type: "choice";
|
|
@@ -55,13 +57,16 @@ export declare const PHI_MARKDOWN_TOC_WIDGET_DEFINITION: {
|
|
|
55
57
|
equals: string;
|
|
56
58
|
};
|
|
57
59
|
options?: undefined;
|
|
60
|
+
description?: undefined;
|
|
58
61
|
min?: undefined;
|
|
59
62
|
max?: undefined;
|
|
60
63
|
precision?: undefined;
|
|
64
|
+
prefix?: undefined;
|
|
61
65
|
} | {
|
|
62
66
|
key: string;
|
|
63
67
|
type: "string";
|
|
64
68
|
label: string;
|
|
69
|
+
description: string;
|
|
65
70
|
visibleWhen: {
|
|
66
71
|
field: string;
|
|
67
72
|
equals: string;
|
|
@@ -72,6 +77,7 @@ export declare const PHI_MARKDOWN_TOC_WIDGET_DEFINITION: {
|
|
|
72
77
|
min?: undefined;
|
|
73
78
|
max?: undefined;
|
|
74
79
|
precision?: undefined;
|
|
80
|
+
prefix?: undefined;
|
|
75
81
|
} | {
|
|
76
82
|
key: string;
|
|
77
83
|
type: "string";
|
|
@@ -80,9 +86,11 @@ export declare const PHI_MARKDOWN_TOC_WIDGET_DEFINITION: {
|
|
|
80
86
|
filter?: undefined;
|
|
81
87
|
placeholder?: undefined;
|
|
82
88
|
visibleWhen?: undefined;
|
|
89
|
+
description?: undefined;
|
|
83
90
|
min?: undefined;
|
|
84
91
|
max?: undefined;
|
|
85
92
|
precision?: undefined;
|
|
93
|
+
prefix?: undefined;
|
|
86
94
|
} | {
|
|
87
95
|
key: string;
|
|
88
96
|
type: "number";
|
|
@@ -94,10 +102,14 @@ export declare const PHI_MARKDOWN_TOC_WIDGET_DEFINITION: {
|
|
|
94
102
|
filter?: undefined;
|
|
95
103
|
placeholder?: undefined;
|
|
96
104
|
visibleWhen?: undefined;
|
|
105
|
+
description?: undefined;
|
|
106
|
+
prefix?: undefined;
|
|
97
107
|
} | {
|
|
98
108
|
key: string;
|
|
99
109
|
type: "number";
|
|
100
110
|
label: string;
|
|
111
|
+
description: string;
|
|
112
|
+
prefix: string;
|
|
101
113
|
options?: undefined;
|
|
102
114
|
filter?: undefined;
|
|
103
115
|
placeholder?: undefined;
|
|
@@ -113,9 +125,11 @@ export declare const PHI_MARKDOWN_TOC_WIDGET_DEFINITION: {
|
|
|
113
125
|
filter?: undefined;
|
|
114
126
|
placeholder?: undefined;
|
|
115
127
|
visibleWhen?: undefined;
|
|
128
|
+
description?: undefined;
|
|
116
129
|
min?: undefined;
|
|
117
130
|
max?: undefined;
|
|
118
131
|
precision?: undefined;
|
|
132
|
+
prefix?: undefined;
|
|
119
133
|
})[];
|
|
120
134
|
parseConfig: typeof parsePhiCmsMarkdownTocWidgetConfig;
|
|
121
135
|
};
|
|
@@ -58,11 +58,23 @@ export const PHI_MARKDOWN_TOC_WIDGET_DEFINITION = {
|
|
|
58
58
|
placeholder: "Select widget",
|
|
59
59
|
visibleWhen: { field: "bindingMode", equals: "target" },
|
|
60
60
|
},
|
|
61
|
-
{
|
|
61
|
+
{
|
|
62
|
+
key: "tocKey",
|
|
63
|
+
type: "string",
|
|
64
|
+
label: "TOC Key",
|
|
65
|
+
description: "The TOC Key of the Markdown widget whose headings this table of contents lists, as set in that widget's settings. Useful when a page has several Markdown texts; a Markdown Widget picked above narrows it to that one.",
|
|
66
|
+
visibleWhen: { field: "bindingMode", equals: "target" },
|
|
67
|
+
},
|
|
62
68
|
{ key: "title", type: "string", label: "Title" },
|
|
63
69
|
{ key: "minLevel", type: "number", label: "Min Heading Level", min: 1, max: 6, precision: 0 },
|
|
64
70
|
{ key: "maxLevel", type: "number", label: "Max Heading Level", min: 1, max: 6, precision: 0 },
|
|
65
|
-
{
|
|
71
|
+
{
|
|
72
|
+
key: "offsetTop",
|
|
73
|
+
type: "number",
|
|
74
|
+
label: "Offset Top",
|
|
75
|
+
description: "How far below the window's top edge a heading stands after a click in the contents, in pixels. Set it to the height of whatever stays fixed at the top, such as a sticky header, so the heading is not hidden beneath it.",
|
|
76
|
+
prefix: "px",
|
|
77
|
+
},
|
|
66
78
|
{ key: "showTitle", type: "boolean", label: "Show Title" },
|
|
67
79
|
],
|
|
68
80
|
parseConfig: parsePhiCmsMarkdownTocWidgetConfig,
|
|
@@ -4,7 +4,8 @@ import { resolvePhiBuilderAreaAsCmsArea, } from "../../../../../constants/cms-ar
|
|
|
4
4
|
import { getPhiBuilderNavigationDefaultScopeKey, createPhiBuilderNavigationPageLookup, resolvePhiBuilderNavigationPageTargets, } from "../../../../../helpers/cms-navigation-catalog";
|
|
5
5
|
import { PhiQuickLinksWidgetClient } from "./client";
|
|
6
6
|
import { PHI_QUICK_LINKS_WIDGET_DEFINITION } from "./config";
|
|
7
|
-
import {
|
|
7
|
+
import { mapPhiNavItemsToQuickLinksItems } from "./items";
|
|
8
|
+
import { mapPhiBuilderNavigationItemsToNavItems } from "../../../../../components/widgets/builder/navigation-items";
|
|
8
9
|
function PhiQuickLinksWidgetBuilderEditor({ runtime, config, canvas, }) {
|
|
9
10
|
if (!canvas.catalogHydrated) {
|
|
10
11
|
return null;
|
|
@@ -15,7 +16,11 @@ function PhiQuickLinksWidgetBuilderEditor({ runtime, config, canvas, }) {
|
|
|
15
16
|
if (!navigation) {
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
/*
|
|
20
|
+
* The live render's path: the draft's items as the navigation the Site would serve -- hidden ones left
|
|
21
|
+
* out -- then mapped to links the way the server maps them, so the canvas shows what the page shows.
|
|
22
|
+
*/
|
|
23
|
+
const items = mapPhiNavItemsToQuickLinksItems(mapPhiBuilderNavigationItemsToNavItems(resolvePhiBuilderNavigationPageTargets(currentCmsArea, navigation.items, createPhiBuilderNavigationPageLookup(canvas.pageCatalogForArea))), runtime.locale.current, currentCmsArea, false);
|
|
19
24
|
return (_jsx(PhiQuickLinksWidgetClient, { labels: { title: config.title }, config: {
|
|
20
25
|
columns: config.columns ?? 2,
|
|
21
26
|
separator: config.separator ?? true,
|