@phis/ui 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/cms/plugins.d.ts +1 -0
- package/cms/plugins.js +2 -0
- package/components/cms/phi-cms-root-layout.js +31 -2
- package/components/controls/phi-background-control.d.ts +6 -1
- package/components/controls/phi-background-control.js +12 -4
- package/components/controls/phi-button-control.d.ts +15 -1
- package/components/controls/phi-button-control.js +21 -3
- package/components/controls/phi-collapse-control.d.ts +6 -2
- package/components/controls/phi-collapse-control.js +2 -2
- package/components/controls/phi-dialog-control.d.ts +11 -5
- package/components/controls/phi-dialog-control.js +19 -13
- package/components/controls/phi-dropdown-control.js +2 -2
- package/components/controls/phi-media-asset-tile-control.js +10 -10
- package/components/controls/phi-menu-control-vocabulary.d.ts +7 -0
- package/components/controls/phi-menu-control-vocabulary.js +10 -0
- package/components/controls/phi-menu-control.d.ts +4 -1
- package/components/controls/phi-menu-control.js +6 -1
- package/components/controls/phi-progress-control.d.ts +10 -2
- package/components/controls/phi-progress-control.js +6 -2
- package/components/controls/phi-ribbon-control.d.ts +4 -1
- package/components/controls/phi-ribbon-control.js +5 -3
- package/components/controls/phi-ribbon-wrap-control.d.ts +7 -1
- package/components/controls/phi-ribbon-wrap-control.js +8 -2
- package/components/controls/phi-segmented-control.d.ts +4 -1
- package/components/controls/phi-segmented-control.js +13 -2
- package/components/controls/phi-surface-control.d.ts +2 -0
- package/components/controls/phi-surface-control.js +16 -1
- package/components/controls/phi-switch-control.d.ts +4 -1
- package/components/controls/phi-switch-control.js +8 -2
- package/components/controls/phi-tag-control.d.ts +4 -1
- package/components/controls/phi-tag-control.js +11 -3
- package/components/layouts/clients/phi-split-card-layout-client.js +13 -5
- package/components/layouts/clients/phi-three-column-layout-client.js +9 -3
- package/components/layouts/phi-layout-view-model.js +10 -1
- package/components/layouts/split-card-geometry.js +6 -2
- package/components/media/aspect-ratios.d.ts +2 -2
- package/components/menus/phi-account-menu.js +3 -1
- package/components/navigation/phi-link.js +7 -2
- package/components/navigation/use-phi-protected-mail.d.ts +11 -0
- package/components/navigation/use-phi-protected-mail.js +29 -0
- package/components/regions/clients/cms-region-container-client.js +16 -2
- package/components/regions/phi-cms-region-container.js +5 -1
- package/components/regions/phi-cms-region-shell.d.ts +11 -0
- package/components/regions/phi-cms-region-shell.js +64 -7
- package/components/regions/presets/phi-area-shell-preset-nodes.js +2 -1
- package/components/root/phi-config-provider.js +16 -0
- package/components/root/phi-root-layout.d.ts +1 -0
- package/components/root/phi-root-layout.js +1 -0
- package/components/root/phi-root-theme-resolver.js +12 -1
- package/components/root/phi-shell-chrome-overlay.d.ts +6 -0
- package/components/root/phi-shell-chrome-overlay.js +7 -1
- package/components/runtime/runtime-module-context.d.ts +12 -1
- package/components/runtime/runtime-module-context.js +6 -1
- package/components/shell/phi-cms-shell.d.ts +9 -1
- package/components/shell/phi-cms-shell.js +10 -4
- package/components/shell/phi-nav-link.js +7 -2
- package/components/shell/phi-shell-sider-drawer.d.ts +17 -0
- package/components/shell/phi-shell-sider-drawer.js +88 -0
- package/components/shell/use-phi-shell-header-bands.d.ts +5 -0
- package/components/shell/use-phi-shell-header-bands.js +64 -0
- package/components/shell/use-phi-shell-sticky-bottom.d.ts +18 -0
- package/components/shell/use-phi-shell-sticky-bottom.js +54 -0
- package/components/tables/client/phi-table-binding.d.ts +1 -0
- package/components/tables/client/phi-table-binding.js +22 -3
- package/components/trees/client/phi-tree-binding.d.ts +1 -0
- package/components/trees/client/phi-tree-binding.js +11 -2
- package/components/widgets/client/shared/phi-collection-provider.js +4 -3
- package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
- package/components/widgets/client/shared/phi-collection-view-binding.js +16 -2
- package/components/widgets/client/shared/phi-command-buttons.js +6 -2
- package/components/widgets/config/background.d.ts +20 -0
- package/components/widgets/config/background.js +44 -2
- package/components/widgets/config/button-variant.d.ts +22 -4
- package/components/widgets/config/button-variant.js +24 -5
- package/components/widgets/config/common-action-field.d.ts +1 -1
- package/components/widgets/config/parser-primitives.js +4 -2
- package/components/widgets/config/theme-gradient.d.ts +11 -0
- package/components/widgets/config/theme-gradient.js +12 -0
- package/components/widgets/helpers/internal-reference-resolver.server.d.ts +1 -0
- package/components/widgets/helpers/internal-reference-resolver.server.js +4 -1
- package/components/widgets/label-sets/background.js +2 -0
- package/components/widgets/label-sets/geometry.js +2 -0
- package/components/widgets/label-sets/inspector.js +6 -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/common-controls.js +2 -2
- package/components/widgets/label-types/geometry.d.ts +1 -0
- package/components/widgets/label-types/geometry.js +1 -0
- package/components/widgets/label-types/inspector.d.ts +6 -0
- package/components/widgets/label-types/inspector.js +3 -0
- package/components/widgets/server/navigation-request.js +13 -1
- package/components/widgets/shared/card-body-client.d.ts +13 -0
- package/components/widgets/shared/card-body-client.js +40 -11
- package/components/widgets/shared/card-vocabulary.d.ts +36 -0
- package/components/widgets/shared/card-vocabulary.js +52 -0
- package/components/widgets/shared/collection-source-failure.d.ts +26 -0
- package/components/widgets/shared/collection-source-failure.js +42 -0
- package/components/widgets/shared/markdown-body-client.d.ts +29 -0
- package/components/widgets/shared/markdown-body-client.js +60 -5
- package/components/widgets/shared/markdown-image-vocabulary.d.ts +31 -0
- package/components/widgets/shared/markdown-image-vocabulary.js +68 -0
- package/components/widgets/shared/markdown-render.d.ts +5 -0
- package/components/widgets/shared/markdown-render.js +139 -11
- package/components/widgets/shared/markdown-sections.d.ts +40 -0
- package/components/widgets/shared/markdown-sections.js +111 -0
- package/components/widgets/shared/widget-failure-client.d.ts +10 -0
- package/components/widgets/shared/widget-failure-client.js +20 -0
- package/components/widgets/shared/widget-failure.d.ts +31 -0
- package/components/widgets/shared/widget-failure.js +20 -0
- package/components/widgets/shared/widget-failure.server.d.ts +9 -0
- package/components/widgets/shared/widget-failure.server.js +12 -0
- package/gateway/dashboard-card-memo.d.ts +3 -0
- package/gateway/dashboard-card-memo.js +25 -0
- package/helpers/cms-region-keys.d.ts +1 -1
- package/helpers/external-href.js +1 -1
- package/helpers/layout-style.d.ts +8 -4
- package/helpers/layout-style.js +3 -2
- package/helpers/mode-paint.d.ts +4 -0
- package/helpers/mode-paint.js +47 -0
- package/helpers/protected-mail.d.ts +16 -0
- package/helpers/protected-mail.js +81 -0
- package/helpers/surface-style.js +33 -11
- package/module-dashboard-cards.d.ts +1 -0
- package/module-dashboard-cards.js +1 -0
- package/module-records.d.ts +7 -0
- package/module-records.js +6 -0
- package/package.json +2 -2
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +1 -1
- package/plugins/runtime-modules/builder/clients/inspector-surface-labels.js +1 -0
- package/plugins/runtime-modules/builder/clients/region-inspector.js +67 -3
- package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +1 -1
- package/plugins/runtime-modules/builder/controller/draft-command-controller.js +7 -4
- package/plugins/runtime-modules/builder/controller/page-controller.js +7 -0
- package/plugins/runtime-modules/builder/persistence.d.ts +3 -0
- package/plugins/runtime-modules/builder/persistence.js +9 -1
- package/plugins/runtime-modules/core/content-entries/record-source.server.d.ts +3 -1
- package/plugins/runtime-modules/core/content-entries/record-source.server.js +7 -4
- package/plugins/runtime-modules/core/widgets/button/client.js +2 -2
- package/plugins/runtime-modules/core/widgets/button/config.d.ts +40 -4
- package/plugins/runtime-modules/core/widgets/button/config.js +12 -0
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +102 -1
- package/plugins/runtime-modules/core/widgets/card/config.js +60 -1
- package/plugins/runtime-modules/core/widgets/card/editor.js +17 -2
- package/plugins/runtime-modules/core/widgets/card/server.js +13 -1
- package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.d.ts +4 -1
- package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +10 -3
- package/plugins/runtime-modules/core/widgets/collection-view/authoring.js +1 -1
- package/plugins/runtime-modules/core/widgets/collection-view/client.d.ts +3 -0
- package/plugins/runtime-modules/core/widgets/collection-view/client.js +47 -11
- package/plugins/runtime-modules/core/widgets/collection-view/image-preview-grid.d.ts +4 -1
- package/plugins/runtime-modules/core/widgets/collection-view/image-preview-grid.js +2 -2
- package/plugins/runtime-modules/core/widgets/collection-view/plugin.js +3 -2
- package/plugins/runtime-modules/core/widgets/collection-view/server.d.ts +6 -1
- package/plugins/runtime-modules/core/widgets/collection-view/server.js +21 -3
- package/plugins/runtime-modules/core/widgets/entry-detail/plugin.js +1 -1
- package/plugins/runtime-modules/core/widgets/entry-detail/server.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/entry-detail/server.js +5 -2
- package/plugins/runtime-modules/core/widgets/entry-header/plugin.js +1 -1
- package/plugins/runtime-modules/core/widgets/entry-header/server.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/entry-header/server.js +5 -2
- package/plugins/runtime-modules/core/widgets/entry-list/plugin.js +1 -1
- package/plugins/runtime-modules/core/widgets/entry-list/server.d.ts +6 -3
- package/plugins/runtime-modules/core/widgets/entry-list/server.js +13 -6
- package/plugins/runtime-modules/core/widgets/entry-list/view.server.js +2 -1
- package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +3 -3
- package/plugins/runtime-modules/core/widgets/gallery/plugin.js +1 -1
- package/plugins/runtime-modules/core/widgets/gallery/server.d.ts +5 -3
- package/plugins/runtime-modules/core/widgets/gallery/server.js +8 -6
- package/plugins/runtime-modules/core/widgets/header-navigation/client.d.ts +6 -1
- package/plugins/runtime-modules/core/widgets/header-navigation/client.js +40 -13
- package/plugins/runtime-modules/core/widgets/header-navigation/config.d.ts +26 -1
- package/plugins/runtime-modules/core/widgets/header-navigation/config.js +27 -0
- package/plugins/runtime-modules/core/widgets/header-navigation/plugin.js +1 -1
- package/plugins/runtime-modules/core/widgets/header-navigation/server.d.ts +2 -2
- package/plugins/runtime-modules/core/widgets/header-navigation/server.js +3 -1
- package/plugins/runtime-modules/core/widgets/image/client.js +11 -7
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +16 -0
- package/plugins/runtime-modules/core/widgets/markdown/config.js +46 -1
- package/plugins/runtime-modules/core/widgets/markdown/server.js +22 -8
- package/plugins/runtime-modules/core/widgets/record/client.d.ts +4 -1
- package/plugins/runtime-modules/core/widgets/record/client.js +8 -3
- package/plugins/runtime-modules/core/widgets/record/plugin.js +3 -2
- package/plugins/runtime-modules/core/widgets/record/server.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/record/server.js +2 -2
- package/plugins/runtime-modules/core/widgets/segmented/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/segmented/config.d.ts +21 -1
- package/plugins/runtime-modules/core/widgets/segmented/config.js +11 -1
- package/plugins/runtime-modules/core/widgets/simple-text/server.js +11 -1
- package/plugins/runtime-modules/core/widgets/switch/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/switch/config.d.ts +19 -0
- package/plugins/runtime-modules/core/widgets/switch/config.js +11 -0
- package/plugins/runtime-modules/core/widgets/table/authoring.js +1 -1
- package/plugins/runtime-modules/core/widgets/table/client.d.ts +4 -1
- package/plugins/runtime-modules/core/widgets/table/client.js +16 -3
- package/plugins/runtime-modules/core/widgets/table/plugin.js +3 -2
- package/plugins/runtime-modules/core/widgets/table/server.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/table/server.js +2 -2
- package/plugins/runtime-modules/core/widgets/table/static-resource-editor.js +2 -1
- package/plugins/runtime-modules/core/widgets/timeline/authoring.js +1 -1
- package/plugins/runtime-modules/core/widgets/timeline/client.d.ts +1 -3
- package/plugins/runtime-modules/core/widgets/timeline/client.js +14 -4
- package/plugins/runtime-modules/core/widgets/tree/authoring.js +1 -1
- package/plugins/runtime-modules/core/widgets/tree/client.d.ts +4 -1
- package/plugins/runtime-modules/core/widgets/tree/client.js +13 -2
- package/plugins/runtime-modules/core/widgets/tree/plugin.js +3 -2
- package/plugins/runtime-modules/core/widgets/tree/server.d.ts +3 -1
- package/plugins/runtime-modules/core/widgets/tree/server.js +2 -2
- package/plugins/runtime-modules/theme/presets.d.ts +9 -1
- package/plugins/runtime-modules/theme/tour.d.ts +9 -1
- package/plugins/runtime-modules/theme/tour.js +10 -1
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +138 -7
- package/runtime-data-provider-client.d.ts +2 -0
- package/runtime-data-provider-client.js +7 -0
- package/styles/controls.css +118 -15
- package/styles/gradients.css +101 -0
- package/styles/layout.css +35 -0
- package/styles/root.css +18 -0
- package/styles/shell.css +206 -0
- package/theme/phi-button-shadow.d.ts +6 -0
- package/theme/phi-theme-gradients.d.ts +96 -0
- package/theme/phi-theme-gradients.js +245 -0
- package/theme/phi-theme-presets.d.ts +3 -0
- package/theme/phi-theme-presets.js +3 -0
- package/theme/phi-theme-tokens.d.ts +5 -1
- package/theme/phi-theme-tokens.js +14 -0
- package/theme/phi-tokens.d.ts +6 -0
- package/theme/phi-tokens.js +6 -0
- package/theme.d.ts +1 -0
- package/theme.js +6 -0
- package/types/cms-presets.d.ts +7 -0
- package/types/core-widget-placements.d.ts +8 -0
- package/types/layout-style.d.ts +9 -8
- package/types/layout-style.js +9 -8
- package/types/surface.d.ts +4 -0
- package/types/surface.js +4 -0
- package/types.d.ts +1 -1
- package/types.js +1 -1
package/theme.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export { isPhiThemePaletteModeSeedKey, mergePhiThemePalettes, PHI_THEME_CUSTOM_COLOR_KEYS, PHI_THEME_PALETTE_MODE_SEED_KEYS, } from "./theme/phi-theme-presets";
|
|
2
2
|
export * from "./theme/phi-tokens";
|
|
3
|
+
/*
|
|
4
|
+
* The Theme's values as a preset writes them: a step of the spacing scale, a colour role, a corner.
|
|
5
|
+
* Each is a reference the Theme resolves per Site and per mode, never a value of its own, so a preset
|
|
6
|
+
* that names one follows whatever Theme it lands in (THEME.md, "Phi scale").
|
|
7
|
+
*/
|
|
8
|
+
export { PHI_COLOR, PHI_RADIUS, PHI_SPACE } from "./theme/antd-css-var-contract";
|
|
3
9
|
export {} from "./theme/phi-theme-blocks";
|
package/types/cms-presets.d.ts
CHANGED
|
@@ -37,11 +37,18 @@ export type PhiCmsRegionConfig = Record<string, unknown> & PhiCmsContainerChrome
|
|
|
37
37
|
fontSize?: CSSProperties["fontSize"];
|
|
38
38
|
lineHeight?: CSSProperties["lineHeight"];
|
|
39
39
|
offsetTop?: PhiCssLength;
|
|
40
|
+
/** The air below a `Sticky` `footer_bottom` when it sticks to the viewport's bottom; nobody else reads it. */
|
|
41
|
+
offsetBottom?: PhiCssLength;
|
|
40
42
|
zIndex?: number;
|
|
41
43
|
/** Which of the Area's Pages show this Shell Region (`helpers/region-page-scope.ts`). */
|
|
42
44
|
pageScope?: PhiCmsRegionPageScope;
|
|
43
45
|
/** How `header_top` comes into view (`helpers/region-page-scope.ts`); every other Region ignores it. */
|
|
44
46
|
reveal?: PhiCmsRegionReveal;
|
|
47
|
+
/**
|
|
48
|
+
* How far the Page's `content` reaches up into its Hero, the Hero's picture running on under it (SHELL.md
|
|
49
|
+
* "Content reaching into the Hero"). Read on `content` alone, and only where the Page has a Hero.
|
|
50
|
+
*/
|
|
51
|
+
heroOverlap?: PhiCssLength;
|
|
45
52
|
};
|
|
46
53
|
/**
|
|
47
54
|
* Which Pages a Shell Region stands on (SHELL.md "Region visibility per Page").
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { PhiBulletListEntry, PhiBulletListStyle } from "../components/widgets/shared/bullet-list-vocabulary";
|
|
2
|
+
import type { PhiMarkdownImageAspectRatio } from "../components/widgets/shared/markdown-image-vocabulary";
|
|
3
|
+
import type { PhiMarkdownFoldSections } from "../components/widgets/shared/markdown-sections";
|
|
2
4
|
import type { PhiRenderableBlockBase } from "./renderable-block";
|
|
3
5
|
import type { PhiTextSource } from "../helpers/text-source";
|
|
4
6
|
import type { PhiRuntimeConditionExpression } from "./runtime-condition";
|
|
@@ -14,6 +16,7 @@ import type { PhiViewerAccessPolicy } from "./access";
|
|
|
14
16
|
import type { PhiWidgetFontFamilyKey, PhiWidgetFontSizeKey } from "./site-theme";
|
|
15
17
|
import type { PhiTableQuery, PhiTableWidgetConfig, PhiTableWidgetFeatures, PhiTableWidgetPresentation } from "./table-widget";
|
|
16
18
|
import type { PhiButtonVariant } from "../components/widgets/config/button-variant";
|
|
19
|
+
import type { PhiThemeGradientKey } from "../theme/phi-theme-gradients";
|
|
17
20
|
import type { PhiTextTone } from "../components/widgets/config/text-tone";
|
|
18
21
|
import type { PhiCommonControlActionKey } from "../components/widgets/label-types/common-controls";
|
|
19
22
|
import type { PhiMaskConfig } from "../components/widgets/config/mask";
|
|
@@ -52,6 +55,9 @@ export type PhiMarkdownWidgetPlacement = PhiWidgetPlacementBase & {
|
|
|
52
55
|
revalidateSeconds?: number;
|
|
53
56
|
textAlign?: PhiMarkdownTextAlign;
|
|
54
57
|
imageFloat?: PhiMarkdownImageFloat;
|
|
58
|
+
imageAspectRatio?: PhiMarkdownImageAspectRatio;
|
|
59
|
+
foldSections?: PhiMarkdownFoldSections;
|
|
60
|
+
faqStructuredData?: boolean;
|
|
55
61
|
textBlockSpacingBefore?: PhiSpacingScaleKey;
|
|
56
62
|
textBlockSpacingAfter?: PhiSpacingScaleKey;
|
|
57
63
|
headingBlockSpacingBefore?: PhiSpacingScaleKey;
|
|
@@ -97,6 +103,8 @@ export type PhiButtonWidgetPlacement = PhiWidgetPlacementBase & PhiControlPlacem
|
|
|
97
103
|
icon?: string;
|
|
98
104
|
value?: string;
|
|
99
105
|
variant?: PhiButtonVariant;
|
|
106
|
+
/** The Theme gradient slot a `gradient` Button is filled with; absent, the first. */
|
|
107
|
+
gradient?: PhiThemeGradientKey;
|
|
100
108
|
linkTarget?: PhiLinkTarget;
|
|
101
109
|
danger?: boolean;
|
|
102
110
|
};
|
package/types/layout-style.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The Background filters that are a pane rather than a treatment of the paint itself.
|
|
3
3
|
*
|
|
4
|
-
* `glass` and `haze` are the same thing at
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* `clear`, `glass` and `haze` are the same thing at three strengths: a sheet that frosts what shows
|
|
5
|
+
* through it, light, medium and strong. The frost and the share of the ground's colour rise together,
|
|
6
|
+
* because moving only one of the two reads as a dirty window rather than as another strength of glass.
|
|
7
|
+
* `clear` lifts and saturates what it shows so it still reads as glass with little tint. Everything
|
|
8
|
+
* that used to test for `glass` asks this instead, so a further strength is a table entry and not
|
|
9
|
+
* another branch.
|
|
9
10
|
*/
|
|
10
|
-
export declare const PHI_GLASS_LAYOUT_EFFECT_IDS: readonly ["glass", "haze"];
|
|
11
|
+
export declare const PHI_GLASS_LAYOUT_EFFECT_IDS: readonly ["glass", "haze", "clear"];
|
|
11
12
|
export type PhiGlassLayoutEffectId = (typeof PHI_GLASS_LAYOUT_EFFECT_IDS)[number];
|
|
12
13
|
export declare function isPhiGlassLayoutEffectId(value: unknown): value is PhiGlassLayoutEffectId;
|
|
13
14
|
export declare const PHI_SHADOW_IDS: readonly ["none", "soft", "strong"];
|
|
@@ -22,11 +23,11 @@ export declare function readPhiShadow(value: unknown): PhiShadow | undefined;
|
|
|
22
23
|
/**
|
|
23
24
|
* What a Background does to the light that reaches it, beside what it paints.
|
|
24
25
|
*
|
|
25
|
-
* `glass` and `
|
|
26
|
+
* `glass`, `haze` and `clear` are panes: they frost what shows THROUGH the surface, so they act on the backdrop and
|
|
26
27
|
* on a ground thinned enough to let it through. `blur` softens the Background's own paint -- the picture,
|
|
27
28
|
* the gradient, the pattern -- and nothing in front of it: the content a surface carries is never filtered.
|
|
28
29
|
* Darkening is not a filter; a colour Overlay at an opacity does it, and lets the colour be chosen.
|
|
29
30
|
*/
|
|
30
|
-
export declare const PHI_BACKGROUND_FILTERS: readonly ["glass", "haze", "blur"];
|
|
31
|
+
export declare const PHI_BACKGROUND_FILTERS: readonly ["glass", "haze", "clear", "blur"];
|
|
31
32
|
export type PhiBackgroundFilter = (typeof PHI_BACKGROUND_FILTERS)[number];
|
|
32
33
|
export declare function isPhiBackgroundFilter(value: unknown): value is PhiBackgroundFilter;
|
package/types/layout-style.js
CHANGED
|
@@ -2,13 +2,14 @@ import { isPhiRecord } from "../helpers/is-record";
|
|
|
2
2
|
/**
|
|
3
3
|
* The Background filters that are a pane rather than a treatment of the paint itself.
|
|
4
4
|
*
|
|
5
|
-
* `glass` and `haze` are the same thing at
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* `clear`, `glass` and `haze` are the same thing at three strengths: a sheet that frosts what shows
|
|
6
|
+
* through it, light, medium and strong. The frost and the share of the ground's colour rise together,
|
|
7
|
+
* because moving only one of the two reads as a dirty window rather than as another strength of glass.
|
|
8
|
+
* `clear` lifts and saturates what it shows so it still reads as glass with little tint. Everything
|
|
9
|
+
* that used to test for `glass` asks this instead, so a further strength is a table entry and not
|
|
10
|
+
* another branch.
|
|
10
11
|
*/
|
|
11
|
-
export const PHI_GLASS_LAYOUT_EFFECT_IDS = ["glass", "haze"];
|
|
12
|
+
export const PHI_GLASS_LAYOUT_EFFECT_IDS = ["glass", "haze", "clear"];
|
|
12
13
|
export function isPhiGlassLayoutEffectId(value) {
|
|
13
14
|
return typeof value === "string" && PHI_GLASS_LAYOUT_EFFECT_IDS.includes(value);
|
|
14
15
|
}
|
|
@@ -32,12 +33,12 @@ export function readPhiShadow(value) {
|
|
|
32
33
|
/**
|
|
33
34
|
* What a Background does to the light that reaches it, beside what it paints.
|
|
34
35
|
*
|
|
35
|
-
* `glass` and `
|
|
36
|
+
* `glass`, `haze` and `clear` are panes: they frost what shows THROUGH the surface, so they act on the backdrop and
|
|
36
37
|
* on a ground thinned enough to let it through. `blur` softens the Background's own paint -- the picture,
|
|
37
38
|
* the gradient, the pattern -- and nothing in front of it: the content a surface carries is never filtered.
|
|
38
39
|
* Darkening is not a filter; a colour Overlay at an opacity does it, and lets the colour be chosen.
|
|
39
40
|
*/
|
|
40
|
-
export const PHI_BACKGROUND_FILTERS = ["glass", "haze", "blur"];
|
|
41
|
+
export const PHI_BACKGROUND_FILTERS = ["glass", "haze", "clear", "blur"];
|
|
41
42
|
export function isPhiBackgroundFilter(value) {
|
|
42
43
|
return typeof value === "string" && PHI_BACKGROUND_FILTERS.includes(value);
|
|
43
44
|
}
|
package/types/surface.d.ts
CHANGED
|
@@ -20,6 +20,9 @@ export type PhiSurfaceTone = (typeof PHI_SURFACE_TONES)[number];
|
|
|
20
20
|
* `effects`, which say how it arrives rather than what it is.
|
|
21
21
|
*
|
|
22
22
|
* - `background` carries its own Filter: a glass pane or a softened paint is something the ground does.
|
|
23
|
+
* - `backgroundDark` is the ground in dark mode, where the box wants another one than in light mode -- a
|
|
24
|
+
* Hero's dark picture for a dark page. Absent, `background` stands in both modes. The page's mode
|
|
25
|
+
* picks, in CSS (`helpers/mode-paint.ts`), so a mode switch needs no render.
|
|
23
26
|
* - `borderSource` says where the line comes from. Only `custom` reads `border`, corners included; under
|
|
24
27
|
* `theme` and `none` the corner is the Site's surface step, so a shape change is seen at once.
|
|
25
28
|
* - `shadow` is depth.
|
|
@@ -29,6 +32,7 @@ export type PhiSurfaceTone = (typeof PHI_SURFACE_TONES)[number];
|
|
|
29
32
|
*/
|
|
30
33
|
export type PhiSurface = {
|
|
31
34
|
background?: PhiCmsBackgroundWidgetConfig | null;
|
|
35
|
+
backgroundDark?: PhiCmsBackgroundWidgetConfig | null;
|
|
32
36
|
borderSource?: PhiCmsBorderSource;
|
|
33
37
|
border?: PhiCmsBorderWidgetConfig | null;
|
|
34
38
|
shadow?: PhiShadow | null;
|
package/types/surface.js
CHANGED
|
@@ -38,6 +38,9 @@ export function readPhiSurface(value) {
|
|
|
38
38
|
const background = isPhiRecord(raw.background)
|
|
39
39
|
? normalizePhiBackgroundWidgetConfig(raw.background)
|
|
40
40
|
: null;
|
|
41
|
+
const backgroundDark = isPhiRecord(raw.backgroundDark)
|
|
42
|
+
? normalizePhiBackgroundWidgetConfig(raw.backgroundDark)
|
|
43
|
+
: null;
|
|
41
44
|
const borderSource = readPhiCmsBorderSource(raw.borderSource);
|
|
42
45
|
const border = isPhiRecord(raw.border)
|
|
43
46
|
? readPhiCmsBorderWidgetConfig(raw.border) ?? null
|
|
@@ -46,6 +49,7 @@ export function readPhiSurface(value) {
|
|
|
46
49
|
const tone = isPhiSurfaceTone(raw.tone) && raw.tone !== "inherit" ? raw.tone : undefined;
|
|
47
50
|
const surface = {
|
|
48
51
|
...(background ? { background } : {}),
|
|
52
|
+
...(backgroundDark ? { backgroundDark } : {}),
|
|
49
53
|
...(borderSource ? { borderSource } : {}),
|
|
50
54
|
...(border ? { border } : {}),
|
|
51
55
|
...(shadow ? { shadow } : {}),
|
package/types.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export type { PhiAuthoringRenderPolicy, PhiCmsBuilderWidgetEditorInteraction, Ph
|
|
|
22
22
|
export type * from "./types/cms-presets";
|
|
23
23
|
export type * from "./types/slot-size-policy";
|
|
24
24
|
export type * from "./types/runtime-data-provider";
|
|
25
|
-
export { isPhiRuntimeDataProviderKey } from "./types/runtime-data-provider";
|
|
25
|
+
export { isPhiRuntimeDataProviderKey, readPhiRuntimeDataProviderBinding } from "./types/runtime-data-provider";
|
|
26
26
|
export type * from "./types/table-widget";
|
|
27
27
|
export type * from "./types/tree-widget";
|
|
28
28
|
export type * from "./types/collection-provider";
|
package/types.js
CHANGED
|
@@ -12,7 +12,7 @@ export * from "./types/spacing";
|
|
|
12
12
|
export * from "./types/runtime-condition";
|
|
13
13
|
export * from "./types/state-machine";
|
|
14
14
|
export * from "./types/access";
|
|
15
|
-
export { isPhiRuntimeDataProviderKey } from "./types/runtime-data-provider";
|
|
15
|
+
export { isPhiRuntimeDataProviderKey, readPhiRuntimeDataProviderBinding } from "./types/runtime-data-provider";
|
|
16
16
|
export * from "./types/form-id";
|
|
17
17
|
export { PhiTableProviderError, readPhiTableProviderError, readPhiTableQuery, } from "./types/table-widget";
|
|
18
18
|
export { PhiTreeProviderError, readPhiTreeProviderError, readPhiTreeProviderQueryResult, readPhiTreeProviderMutationResult, validatePhiTreeWidgetBinding, } from "./types/tree-widget";
|