@phis/ui 0.4.15 → 0.4.17
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 +2 -1
- package/components/controls/phi-table-control.js +15 -0
- package/components/forms/compound-form-controls.js +2 -1
- package/components/regions/clients/cms-region-container-client.d.ts +3 -1
- package/components/regions/clients/cms-region-container-client.js +2 -1
- package/components/regions/phi-cms-region-container.d.ts +3 -1
- package/components/regions/phi-cms-region-container.js +3 -2
- package/components/regions/phi-cms-region-shell.d.ts +16 -1
- package/components/regions/phi-cms-region-shell.js +39 -10
- package/components/regions/phi-cms-region-static.d.ts +3 -1
- package/components/regions/phi-cms-region-static.js +2 -1
- package/components/widgets/label-sets/observability-logs.d.ts +2 -0
- package/components/widgets/label-sets/observability-logs.js +4 -0
- package/components/widgets/label-sets/search.js +2 -0
- package/components/widgets/label-types/search.d.ts +2 -0
- package/components/widgets/label-types/search.js +1 -0
- package/constants/cms-widget-types.js +3 -2
- package/helpers/renderable-block-defaults.js +1 -0
- package/helpers/renderable-block-serialization.js +7 -1
- package/helpers/site-runtime.js +3 -0
- package/net/log.d.ts +1 -0
- package/net/log.js +19 -1
- package/net/phi-next-proxy.js +9 -1
- package/package.json +2 -2
- package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +13 -0
- package/plugins/runtime-modules/app/presets.js +0 -23
- package/plugins/runtime-modules/area-contributions/app.d.ts +1 -1
- package/plugins/runtime-modules/area-contributions/app.js +2 -0
- package/plugins/runtime-modules/area-contributions/public.d.ts +1 -1
- package/plugins/runtime-modules/area-contributions/public.js +2 -0
- package/plugins/runtime-modules/area-module-defaults.js +21 -2
- package/plugins/runtime-modules/builder/page-meta-form.js +11 -0
- package/plugins/runtime-modules/client-authoring-providers/app.d.ts +1 -1
- package/plugins/runtime-modules/client-authoring-providers/app.js +6 -0
- package/plugins/runtime-modules/client-authoring-providers/public.d.ts +1 -1
- package/plugins/runtime-modules/client-authoring-providers/public.js +6 -0
- package/plugins/runtime-modules/client-manifests/common.js +2 -2
- package/plugins/runtime-modules/core/authoring-widgets.js +0 -4
- package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
- package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +1 -1
- package/plugins/runtime-modules/core/widgets/table/client.js +7 -5
- package/plugins/runtime-modules/core/widgets/table/config.js +8 -1
- package/plugins/runtime-modules/core/widgets/tree/client.js +1 -1
- package/plugins/runtime-modules/core/widgets.js +0 -17
- package/plugins/runtime-modules/groups/trees/group-tables.d.ts +44 -0
- package/plugins/runtime-modules/groups/trees/group-tables.js +150 -0
- package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +28 -136
- package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +9 -106
- package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +17 -5
- package/plugins/runtime-modules/observability/data-providers.d.ts +9 -0
- package/plugins/runtime-modules/observability/data-providers.js +5 -0
- package/plugins/runtime-modules/observability/definition.d.ts +9 -0
- package/plugins/runtime-modules/observability/module.d.ts +9 -0
- package/plugins/runtime-modules/observability/services/table.js +4 -0
- package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +13 -0
- package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +21 -0
- package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
- package/plugins/runtime-modules/preset-contracts/pub-area.js +1 -0
- package/plugins/runtime-modules/public/presets.d.ts +0 -16
- package/plugins/runtime-modules/public/presets.js +0 -22
- package/plugins/runtime-modules/public-base-page-references.d.ts +0 -1
- package/plugins/runtime-modules/public-base-page-references.js +0 -1
- package/plugins/runtime-modules/search/authoring-widgets.d.ts +2 -0
- package/plugins/runtime-modules/search/authoring-widgets.js +8 -0
- package/plugins/runtime-modules/search/authoring.d.ts +1 -0
- package/plugins/runtime-modules/search/authoring.js +8 -0
- package/plugins/runtime-modules/search/definition.d.ts +21 -0
- package/plugins/runtime-modules/search/definition.js +23 -0
- package/plugins/runtime-modules/search/ids.d.ts +6 -0
- package/plugins/runtime-modules/search/ids.js +7 -0
- package/plugins/runtime-modules/search/module.d.ts +10 -0
- package/plugins/runtime-modules/search/module.js +4 -0
- package/plugins/runtime-modules/search/page-references.d.ts +8 -0
- package/plugins/runtime-modules/search/page-references.js +17 -0
- package/plugins/runtime-modules/{search-page-tree.d.ts → search/page-tree.d.ts} +1 -1
- package/plugins/runtime-modules/{search-page-tree.js → search/page-tree.js} +9 -7
- package/plugins/runtime-modules/search/presets.d.ts +12 -0
- package/plugins/runtime-modules/search/presets.js +33 -0
- package/plugins/runtime-modules/search/server.d.ts +1 -0
- package/plugins/runtime-modules/search/server.js +16 -0
- package/plugins/runtime-modules/search/widgets/search-box/authoring.d.ts +8 -0
- package/plugins/runtime-modules/search/widgets/search-box/authoring.js +21 -0
- package/plugins/runtime-modules/search/widgets/search-box/client.d.ts +39 -0
- package/plugins/runtime-modules/search/widgets/search-box/client.js +114 -0
- package/plugins/runtime-modules/search/widgets/search-box/config.d.ts +96 -0
- package/plugins/runtime-modules/search/widgets/search-box/config.js +67 -0
- package/plugins/runtime-modules/{core → search}/widgets/search-box/plugin.js +1 -4
- package/plugins/runtime-modules/search/widgets/search-box/server.d.ts +15 -0
- package/plugins/runtime-modules/{core → search}/widgets/search-box/server.js +13 -14
- package/plugins/runtime-modules/{core → search}/widgets/search-results/config.d.ts +0 -1
- package/plugins/runtime-modules/{core → search}/widgets/search-results/config.js +0 -1
- package/plugins/runtime-modules/{core → search}/widgets/search-results/plugin.js +1 -3
- package/plugins/runtime-modules/{core → search}/widgets/search-results/server.d.ts +1 -2
- package/plugins/runtime-modules/{core → search}/widgets/search-results/server.js +2 -2
- package/plugins/runtime-modules/search/widgets.d.ts +2 -0
- package/plugins/runtime-modules/search/widgets.js +20 -0
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +15 -1
- package/server-helpers/search-index.js +9 -0
- package/styles/root.css +2 -0
- package/styles/shell.css +178 -18
- package/theme/phi-theme-tokens.d.ts +1 -1
- package/theme/phi-theme-tokens.js +2 -0
- package/types/renderable-block.d.ts +5 -0
- package/types/table-widget.d.ts +10 -1
- package/types/table-widget.js +1 -0
- package/plugins/runtime-modules/core/widgets/search-box/authoring.d.ts +0 -6
- package/plugins/runtime-modules/core/widgets/search-box/authoring.js +0 -10
- package/plugins/runtime-modules/core/widgets/search-box/client.d.ts +0 -21
- package/plugins/runtime-modules/core/widgets/search-box/client.js +0 -17
- package/plugins/runtime-modules/core/widgets/search-box/config.d.ts +0 -63
- package/plugins/runtime-modules/core/widgets/search-box/config.js +0 -48
- package/plugins/runtime-modules/core/widgets/search-box/server.d.ts +0 -21
- package/plugins/runtime-modules/search-page-references.d.ts +0 -20
- package/plugins/runtime-modules/search-page-references.js +0 -35
- /package/plugins/runtime-modules/{core → search}/widgets/search-box/plugin.d.ts +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/authoring.d.ts +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/authoring.js +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/client.d.ts +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/client.js +0 -0
- /package/plugins/runtime-modules/{core → search}/widgets/search-results/plugin.d.ts +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { resolvePhiCmsWidgetPluginKey } from "../../../../../constants/cms-widget-types";
|
|
2
|
+
import { PHI_SEARCH_WIDGET_DEFAULT_LABELS } from "../../../../../components/widgets/label-types/search";
|
|
3
|
+
import { readRenderableBlockConfig, } from "../../../../../components/widgets/config/parser-primitives";
|
|
4
|
+
const PHI_SEARCH_BOX_SIZES = ["small", "medium", "large"];
|
|
5
|
+
export const PHI_SEARCH_BOX_VARIANTS = ["input", "icon-only", "auto"];
|
|
6
|
+
function normalizePhiSearchBoxWidgetConfig(raw) {
|
|
7
|
+
return {
|
|
8
|
+
...readRenderableBlockConfig(raw),
|
|
9
|
+
placeholder: typeof raw.placeholder === "string"
|
|
10
|
+
? raw.placeholder.trim()
|
|
11
|
+
: PHI_SEARCH_WIDGET_DEFAULT_LABELS.placeholder,
|
|
12
|
+
controlSize: PHI_SEARCH_BOX_SIZES.includes(raw.controlSize)
|
|
13
|
+
? raw.controlSize
|
|
14
|
+
: undefined,
|
|
15
|
+
variant: PHI_SEARCH_BOX_VARIANTS.includes(raw.variant)
|
|
16
|
+
? raw.variant
|
|
17
|
+
: undefined,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export const PHI_SEARCH_BOX_WIDGET_DEFINITION = {
|
|
21
|
+
kind: "widget",
|
|
22
|
+
pluginKey: resolvePhiCmsWidgetPluginKey("search-box"),
|
|
23
|
+
typeKey: "search-box",
|
|
24
|
+
title: "Search Box",
|
|
25
|
+
description: "A box that sends what a visitor types to the Site's search results page.",
|
|
26
|
+
category: "navigation",
|
|
27
|
+
tags: ["search", "find", "navigation"],
|
|
28
|
+
icon: "antd:search",
|
|
29
|
+
slotSizePolicy: "fill-inline",
|
|
30
|
+
fields: [
|
|
31
|
+
{
|
|
32
|
+
key: "placeholder",
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Placeholder",
|
|
35
|
+
// Cleared is kept as cleared: the box then says nothing, rather than "Search" again.
|
|
36
|
+
emptyValue: "",
|
|
37
|
+
description: "Translated. Empty shows nothing.",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: "variant",
|
|
41
|
+
type: "choice",
|
|
42
|
+
label: "Variant",
|
|
43
|
+
description: "Icon only opens into the field when pressed. Auto is the input, and the icon on a phone.",
|
|
44
|
+
options: [
|
|
45
|
+
{ value: "input", label: "Input" },
|
|
46
|
+
{ value: "icon-only", label: "Icon only" },
|
|
47
|
+
{ value: "auto", label: "Auto" },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
key: "controlSize",
|
|
52
|
+
type: "choice",
|
|
53
|
+
label: "Size",
|
|
54
|
+
options: [
|
|
55
|
+
{ value: "small", label: "Small" },
|
|
56
|
+
{ value: "medium", label: "Medium" },
|
|
57
|
+
{ value: "large", label: "Large" },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
/*
|
|
62
|
+
* What the Inspector shows chosen where a box states nothing, and what an absent value renders as: the
|
|
63
|
+
* input, at the house's medium size.
|
|
64
|
+
*/
|
|
65
|
+
defaultConfig: { ...normalizePhiSearchBoxWidgetConfig({}), variant: "input", controlSize: "medium" },
|
|
66
|
+
parseConfig: normalizePhiSearchBoxWidgetConfig,
|
|
67
|
+
};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PhiCmsFlags } from "../../../../../constants/phi-cms";
|
|
3
|
-
import { hasPhiFlag } from "../../../../../helpers/flags";
|
|
4
2
|
import { definePhiPassiveWidgetRenderers } from "../../../../../plugins/factories/widget-renderers";
|
|
5
3
|
import { PHI_SEARCH_BOX_WIDGET_DEFINITION } from "./config";
|
|
6
4
|
import { PhiSearchBoxWidget } from "./server";
|
|
7
5
|
export const PHI_SEARCH_BOX_WIDGET_PLUGIN = {
|
|
8
6
|
...PHI_SEARCH_BOX_WIDGET_DEFINITION,
|
|
9
|
-
|
|
10
|
-
...definePhiPassiveWidgetRenderers(({ widget, config, runtime, links }) => (_jsx(PhiSearchBoxWidget, { config: config, runtime: runtime, links: links, translate: !hasPhiFlag(widget.flags, PhiCmsFlags.NoTranslate) }, `widget-${widget.id}`))),
|
|
7
|
+
...definePhiPassiveWidgetRenderers(({ widget, config, runtime }) => (_jsx(PhiSearchBoxWidget, { config: config, runtime: runtime }, `widget-${widget.id}`))),
|
|
11
8
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PhiNoLabels, PhiServerBlockBaseProps } from "../../../../../types";
|
|
2
|
+
import type { PhiSearchBoxWidgetConfig } from "./config";
|
|
3
|
+
export type PhiSearchBoxWidgetProps = PhiServerBlockBaseProps<PhiNoLabels, PhiSearchBoxWidgetConfig>;
|
|
4
|
+
/**
|
|
5
|
+
* The search box, resolved on the server: where the form goes, what the box says, what it already holds.
|
|
6
|
+
*
|
|
7
|
+
* Where it goes is the Search Module's results Page of the Area it stands in, a reference resolved as
|
|
8
|
+
* every link is. A Page that does not resolve -- unpublished -- draws no box at all rather than one that
|
|
9
|
+
* leads to "not found". The placeholder is the author's words, always translated: a box whose prompt
|
|
10
|
+
* stays in one language on a Site that speaks several has nothing to gain from it.
|
|
11
|
+
*
|
|
12
|
+
* On the results Page itself the box shows the query it is answering, read from the same URL parameter
|
|
13
|
+
* the results Widget reads.
|
|
14
|
+
*/
|
|
15
|
+
export declare function PhiSearchBoxWidget({ config, runtime }: PhiSearchBoxWidgetProps): Promise<import("react").JSX.Element | null>;
|
|
@@ -7,41 +7,40 @@ import { resolvePhiLinkHref } from "../../../../../helpers/link-target";
|
|
|
7
7
|
import { resolvePhiLinkTargetReferences } from "../../../../../server-helpers/cms-link-targets";
|
|
8
8
|
import { phiRuntime } from "../../../../../server-helpers/phi-runtime";
|
|
9
9
|
import { trBulkForLocale } from "../../../../../server-helpers/translate";
|
|
10
|
-
import { resolvePhiSearchPageLinkTarget } from "
|
|
10
|
+
import { resolvePhiSearchPageLinkTarget } from "../../page-references";
|
|
11
11
|
/**
|
|
12
12
|
* The search box, resolved on the server: where the form goes, what the box says, what it already holds.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* Where it goes is the Search Module's results Page of the Area it stands in, a reference resolved as
|
|
15
|
+
* every link is. A Page that does not resolve -- unpublished -- draws no box at all rather than one that
|
|
16
|
+
* leads to "not found". The placeholder is the author's words, always translated: a box whose prompt
|
|
17
|
+
* stays in one language on a Site that speaks several has nothing to gain from it.
|
|
18
18
|
*
|
|
19
19
|
* On the results Page itself the box shows the query it is answering, read from the same URL parameter
|
|
20
20
|
* the results Widget reads.
|
|
21
21
|
*/
|
|
22
|
-
export async function PhiSearchBoxWidget({ config, runtime
|
|
22
|
+
export async function PhiSearchBoxWidget({ config, runtime }) {
|
|
23
23
|
const rt = phiRuntime(runtime);
|
|
24
24
|
const locale = runtime.locale.current;
|
|
25
|
-
const target =
|
|
26
|
-
const resolved =
|
|
27
|
-
?
|
|
28
|
-
:
|
|
29
|
-
? await resolvePhiLinkTargetReferences(new Map([["linkTarget", { reference: target.reference, area: target.area ?? null }]]), runtime)
|
|
30
|
-
: null;
|
|
25
|
+
const target = resolvePhiSearchPageLinkTarget(runtime.area);
|
|
26
|
+
const resolved = target.kind === "page"
|
|
27
|
+
? await resolvePhiLinkTargetReferences(new Map([["linkTarget", { reference: target.reference, area: target.area ?? null }]]), runtime)
|
|
28
|
+
: null;
|
|
31
29
|
const href = resolvePhiLinkHref(target, resolved);
|
|
32
30
|
if (!href) {
|
|
33
31
|
return null;
|
|
34
32
|
}
|
|
35
33
|
const [labels, [placeholder]] = await Promise.all([
|
|
36
34
|
getPhiSearchWidgetLabels({ apiBaseUrl: rt.apiBaseUrl, internalToken: rt.internalToken, locale }),
|
|
37
|
-
config?.placeholder
|
|
35
|
+
config?.placeholder ? trBulkForLocale(locale, [config.placeholder]) : [""],
|
|
38
36
|
]);
|
|
39
37
|
return (_jsx(PhiRuntimeModuleRenderClientHost, { type: PhiCmsWidgetType.SearchBox, componentProps: {
|
|
40
38
|
labels,
|
|
41
39
|
config: {
|
|
42
40
|
action: href.href,
|
|
43
|
-
placeholder
|
|
41
|
+
placeholder,
|
|
44
42
|
...(config?.controlSize ? { size: config.controlSize } : {}),
|
|
43
|
+
...(config?.variant ? { variant: config.variant } : {}),
|
|
45
44
|
initialQuery: runtime.request?.searchParams?.[PHI_SEARCH_QUERY_PARAM] ?? "",
|
|
46
45
|
},
|
|
47
46
|
} }));
|
|
@@ -16,7 +16,6 @@ export const PHI_SEARCH_RESULTS_WIDGET_DEFINITION = {
|
|
|
16
16
|
description: "The Site's pages matching the search in the page's address, best first.",
|
|
17
17
|
category: "content",
|
|
18
18
|
tags: ["search", "results", "find"],
|
|
19
|
-
translatesOwnText: true,
|
|
20
19
|
icon: "antd:search",
|
|
21
20
|
slotSizePolicy: "fill-inline",
|
|
22
21
|
fields: [
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PhiCmsFlags } from "../../../../../constants/phi-cms";
|
|
3
|
-
import { hasPhiFlag } from "../../../../../helpers/flags";
|
|
4
2
|
import { definePhiPassiveWidgetRenderers } from "../../../../../plugins/factories/widget-renderers";
|
|
5
3
|
import { PHI_SEARCH_RESULTS_WIDGET_DEFINITION } from "./config";
|
|
6
4
|
import { PhiSearchResultsWidget } from "./server";
|
|
7
5
|
export const PHI_SEARCH_RESULTS_WIDGET_PLUGIN = {
|
|
8
6
|
...PHI_SEARCH_RESULTS_WIDGET_DEFINITION,
|
|
9
|
-
...definePhiPassiveWidgetRenderers(({ widget, config, runtime }) => (_jsx(PhiSearchResultsWidget, { config: config, runtime: runtime,
|
|
7
|
+
...definePhiPassiveWidgetRenderers(({ widget, config, runtime }) => (_jsx(PhiSearchResultsWidget, { config: config, runtime: runtime, widgetId: widget.id }, `widget-${widget.id}`))),
|
|
10
8
|
};
|
|
@@ -2,7 +2,6 @@ import type { PhiNoLabels, PhiServerBlockBaseProps } from "../../../../../types"
|
|
|
2
2
|
import type { PhiCmsInstanceId } from "../../../../../types/cms-instance-id";
|
|
3
3
|
import type { PhiSearchResultsWidgetConfig } from "./config";
|
|
4
4
|
export type PhiSearchResultsWidgetProps = PhiServerBlockBaseProps<PhiNoLabels, PhiSearchResultsWidgetConfig> & {
|
|
5
|
-
translate?: boolean;
|
|
6
5
|
widgetId?: PhiCmsInstanceId | null;
|
|
7
6
|
};
|
|
8
7
|
/**
|
|
@@ -17,4 +16,4 @@ export type PhiSearchResultsWidgetProps = PhiServerBlockBaseProps<PhiNoLabels, P
|
|
|
17
16
|
* A failed read is `PhiWidgetFailureServer`: an empty list would tell the visitor the Site has nothing on
|
|
18
17
|
* the subject, which is not what happened.
|
|
19
18
|
*/
|
|
20
|
-
export declare function PhiSearchResultsWidget({ config, runtime,
|
|
19
|
+
export declare function PhiSearchResultsWidget({ config, runtime, widgetId }: PhiSearchResultsWidgetProps): Promise<import("react").JSX.Element>;
|
|
@@ -29,13 +29,13 @@ function readHitArea(areaMask) {
|
|
|
29
29
|
* A failed read is `PhiWidgetFailureServer`: an empty list would tell the visitor the Site has nothing on
|
|
30
30
|
* the subject, which is not what happened.
|
|
31
31
|
*/
|
|
32
|
-
export async function PhiSearchResultsWidget({ config, runtime,
|
|
32
|
+
export async function PhiSearchResultsWidget({ config, runtime, widgetId }) {
|
|
33
33
|
const rt = phiRuntime(runtime);
|
|
34
34
|
const locale = runtime.locale.current;
|
|
35
35
|
const renderMode = readPhiRuntimeTreeRenderMode(config ?? {});
|
|
36
36
|
const [labels, [title]] = await Promise.all([
|
|
37
37
|
getPhiSearchResultsWidgetLabels({ apiBaseUrl: rt.apiBaseUrl, internalToken: rt.internalToken, locale }),
|
|
38
|
-
config?.title
|
|
38
|
+
config?.title ? trBulkForLocale(locale, [config.title]) : [""],
|
|
39
39
|
]);
|
|
40
40
|
const raw = runtime.request?.searchParams?.[PHI_SEARCH_QUERY_PARAM];
|
|
41
41
|
const query = readPhiSearchQuery(raw);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PHI_SEARCH_RUNTIME_MODULE_ID } from "./ids";
|
|
2
|
+
import { PHI_SEARCH_BOX_WIDGET_DEFINITION } from "./widgets/search-box/config";
|
|
3
|
+
import { PHI_SEARCH_RESULTS_WIDGET_DEFINITION } from "./widgets/search-results/config";
|
|
4
|
+
import { definePhiFirstPartyWidget } from "../contracts";
|
|
5
|
+
export const PHI_SEARCH_RUNTIME_MODULE_WIDGETS = [
|
|
6
|
+
definePhiFirstPartyWidget({
|
|
7
|
+
definition: PHI_SEARCH_BOX_WIDGET_DEFINITION,
|
|
8
|
+
ownerModuleId: PHI_SEARCH_RUNTIME_MODULE_ID,
|
|
9
|
+
renderPolicies: { runtime: "custom", preview: "custom", authoring: "custom" },
|
|
10
|
+
loadRuntime: () => import("./widgets/search-box/plugin").then((module) => module.PHI_SEARCH_BOX_WIDGET_PLUGIN),
|
|
11
|
+
loadPreview: () => import("./widgets/search-box/plugin").then((module) => module.PHI_SEARCH_BOX_WIDGET_PLUGIN),
|
|
12
|
+
}),
|
|
13
|
+
definePhiFirstPartyWidget({
|
|
14
|
+
definition: PHI_SEARCH_RESULTS_WIDGET_DEFINITION,
|
|
15
|
+
ownerModuleId: PHI_SEARCH_RUNTIME_MODULE_ID,
|
|
16
|
+
renderPolicies: { runtime: "custom", preview: "custom", authoring: "custom" },
|
|
17
|
+
loadRuntime: () => import("./widgets/search-results/plugin").then((module) => module.PHI_SEARCH_RESULTS_WIDGET_PLUGIN),
|
|
18
|
+
loadPreview: () => import("./widgets/search-results/plugin").then((module) => module.PHI_SEARCH_RESULTS_WIDGET_PLUGIN),
|
|
19
|
+
}),
|
|
20
|
+
];
|
|
@@ -25,6 +25,7 @@ import { PHI_CONTROL_HEIGHTS, PHI_PADDING, PHI_RADII, } from "../../../../../the
|
|
|
25
25
|
import { PHI_COLOR_PICKER_NEUTRAL_PRESETS, PHI_COLOR_PICKER_PRESETS } from "../../../../../components/widgets/config/color-picker-presets";
|
|
26
26
|
import { PHI_SPACING_TOKEN_KEYS } from "../../../../../components/widgets/config/spacing-options";
|
|
27
27
|
import { PhiColorFieldControl } from "../../../../../components/controls/phi-color-field-control";
|
|
28
|
+
import { usePhiColorControlPresets } from "../../../../../components/controls/use-phi-color-control-presets";
|
|
28
29
|
import { PhiBrandControl, resolvePhiBrandLogoUrl } from "../../../../../components/controls/phi-brand-control";
|
|
29
30
|
import { PhiBackgroundControl } from "../../../../../components/controls/phi-background-control";
|
|
30
31
|
import { PHI_ROOT_BACKGROUND_BASE_KINDS, PHI_ROOT_BACKGROUND_IMAGE_SOURCE_KINDS, PHI_ROOT_BACKGROUND_FILTERS, PHI_ROOT_BACKGROUND_MOTION_MODES, resolvePhiRootBackgroundPaintStyle, } from "../../../../../components/root/phi-root-background";
|
|
@@ -1550,6 +1551,19 @@ export function PhiBuilderBrandIdentityControlsWidgetClient({ runtime, config, }
|
|
|
1550
1551
|
const resolvedDraft = resolvePhiThemeRuntimePayload(state.draft, themeBlocks).theme;
|
|
1551
1552
|
return resolveBrandDraftAliasTokens(resolvedDraft, resolveThemePayloadPreset(resolvedDraft, themePresets), mode);
|
|
1552
1553
|
}, [mode, state.draft, themeBlocks, themePresets]);
|
|
1554
|
+
/*
|
|
1555
|
+
* A Wordmark part picks from what every colour field of the Theme offers: the draft's custom colours in
|
|
1556
|
+
* the mode being authored, the primary and text ladders, then the fixed palettes. It stores the colour,
|
|
1557
|
+
* not the role -- the Theme is where those roles are set.
|
|
1558
|
+
*/
|
|
1559
|
+
const wordmarkCustomColors = useMemo(() => {
|
|
1560
|
+
const palette = resolveThemeCustomPalette(state.draft, resolveThemePayloadPreset(state.draft, themePresets), mode);
|
|
1561
|
+
return PHI_THEME_CUSTOM_COLOR_KEYS.map((key, index) => ({ key, label: `Custom ${index + 1}`, value: palette[key] }));
|
|
1562
|
+
}, [mode, state.draft, themePresets]);
|
|
1563
|
+
const wordmarkColorPresets = usePhiColorControlPresets({
|
|
1564
|
+
customColors: wordmarkCustomColors,
|
|
1565
|
+
presets: PHI_COLOR_PICKER_PRESETS,
|
|
1566
|
+
});
|
|
1553
1567
|
const [activeIdentitySection, changeActiveIdentitySection] = usePhiBrandAccordionSection(BRAND_THEME_IDENTITY_COLLAPSE_STORAGE_KEY, BRAND_THEME_IDENTITY_SECTION_KEYS);
|
|
1554
1568
|
const brand = state.draft.brand ?? {};
|
|
1555
1569
|
/*
|
|
@@ -1677,7 +1691,7 @@ export function PhiBuilderBrandIdentityControlsWidgetClient({ runtime, config, }
|
|
|
1677
1691
|
? _jsxs(_Fragment, { children: ["The Site name as it is set. One part per colour: a two-tone name is one word written in two. With no part at all the frame shows ", fallbackWordmark, "."] })
|
|
1678
1692
|
: _jsx(_Fragment, { children: "The Brand is the Logo alone. The name is not drawn, and neither is the Eyebrow above it." }) }), _jsx(PhiSwitchControl, { label: "Show name", checked: showsWordmark, checkedLabel: "On", uncheckedLabel: "Off", onChange: (checked) => publishDraft(mergeThemeWordmarkShows(state.draft, checked)) }), showsWordmark && (_jsxs(_Fragment, { children: [editableWordmarkParts.map((part, index) => (_jsx(PhiLabeledControl, { label: `Part #${index + 1}`, fill: true, children: _jsxs(PhiFlexControl, { gap: clientToken.paddingXXS, align: "center", style: { width: "100%", minWidth: 0 }, children: [_jsx(PhiTextControl, { value: part.text, placeholder: index === 0 ? fallbackWordmark : "Part", ariaLabel: `Wordmark part ${index + 1}`, allowClear: false, onChange: (next) => updateWordmarkPart(index, { text: next ?? "" }) }), _jsx(PhiColorControl, { mode: "single", allowClear: true,
|
|
1679
1693
|
// A part's row is narrow: the swatch says the colour, the value would overflow it.
|
|
1680
|
-
showText: false, value: part.color ?? null, presets:
|
|
1694
|
+
showText: false, value: part.color ?? null, presets: wordmarkColorPresets, onChange: (next) => updateWordmarkPart(index, { color: next }) }), _jsx(PhiButtonControl, { type: "text", size: "small", danger: true, disabled: wordmarkParts.length === 0, icon: _jsx(PhiIcon, { name: "delete", size: "inherit" }), ariaLabel: "Remove this part of the Wordmark", onClick: () => {
|
|
1681
1695
|
setWordmarkPartKeys((current) => ({
|
|
1682
1696
|
...current,
|
|
1683
1697
|
keys: current.keys.filter((_, at) => at !== index),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import "server-only";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
+
import { PHI_SHARED_PACKAGE_NAME } from "../constants/package";
|
|
4
|
+
import { createPhiRuntimeModuleId } from "../constants/module-identity";
|
|
3
5
|
import { PHI_SEARCH_MAX_DOCUMENTS } from "@phis/contracts/search";
|
|
4
6
|
import { resolvePhiCmsPageRedirect } from "../components/cms/phi-cms-page-redirect";
|
|
5
7
|
import { getSiteAreaWithPublishedPages } from "../gateway/site-area";
|
|
@@ -35,6 +37,11 @@ import { joinPhiSearchText } from "./search-text";
|
|
|
35
37
|
* during a run queues one more.
|
|
36
38
|
*/
|
|
37
39
|
const PHI_SEARCH_INDEX_AREAS = ["public", "app"];
|
|
40
|
+
/*
|
|
41
|
+
* The first-party Search Module, named by id as data (MODULES.md, "The dependency rule"): an Area is
|
|
42
|
+
* indexed only where it is switched on, since only there is anything placed that reads the index.
|
|
43
|
+
*/
|
|
44
|
+
const PHI_SEARCH_RUNTIME_MODULE_ID = createPhiRuntimeModuleId(PHI_SHARED_PACKAGE_NAME, "search");
|
|
38
45
|
/** How many Pages are resolved at once; each is a page lookup against the server. */
|
|
39
46
|
const PHI_SEARCH_INDEX_RESOLVE_CONCURRENCY = 4;
|
|
40
47
|
/** How long after the marker moved the run starts, so a burst of publishes is one run. */
|
|
@@ -181,6 +188,8 @@ async function indexArea({ area, bridge, credentials, heldFingerprint, }) {
|
|
|
181
188
|
preset: areaPreset?.preset ?? null,
|
|
182
189
|
serverCapabilities: anonymous.serverCapabilities,
|
|
183
190
|
});
|
|
191
|
+
if (!activeModuleIds.has(PHI_SEARCH_RUNTIME_MODULE_ID))
|
|
192
|
+
return;
|
|
184
193
|
const candidates = collectPhiSitemapCandidates({
|
|
185
194
|
moduleRoutes: [...routeTable.exactByPath].map(([path, descriptor]) => [path, descriptor]),
|
|
186
195
|
publishedPages,
|
package/styles/root.css
CHANGED
|
@@ -91,7 +91,9 @@ samp {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
:where([data-phi-renderable-block="true"][data-phi-effects-transition], [data-phi-renderable-block="true"][data-phi-effects-viewport]) {
|
|
94
|
+
/* `--phi-effects-viewport-perspective` is unset unless a viewport effect turns about x or y; it must lead. */
|
|
94
95
|
--phi-effects-viewport-transform:
|
|
96
|
+
var(--phi-effects-viewport-perspective,)
|
|
95
97
|
translate3d(var(--phi-effects-viewport-x, 0px), var(--phi-effects-viewport-y, 0px), 0)
|
|
96
98
|
rotateX(var(--phi-effects-viewport-rotate-x, 0deg))
|
|
97
99
|
rotateY(var(--phi-effects-viewport-rotate-y, 0deg))
|
package/styles/shell.css
CHANGED
|
@@ -469,33 +469,36 @@
|
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
/*
|
|
472
|
-
* A
|
|
472
|
+
* A band with a ground of its own takes no paint from its family's pane (SHELL.md "A band with a ground
|
|
473
|
+
* of its own").
|
|
473
474
|
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
475
|
+
* The band carries `data-phi-shell-own-ground` when it paints its own ground: a tone (LAYOUTING.md
|
|
476
|
+
* "Surface tone"), an authored Background other than the Theme's Overlay taken as the Shell's, or a top
|
|
477
|
+
* Layout that paints one -- the floating Header bar. Such a band never carries the marker. The pane
|
|
478
|
+
* behind it would paint the frame under a ground that is already there: a second frosting under a
|
|
479
|
+
* glass band, the page-mode glass under a tone's, a full-width strip behind a floating bar. The pane
|
|
480
|
+
* cannot be cut around one band without knowing its height, so it stops painting for the whole family
|
|
481
|
+
* and the family's marker bands paint the Overlay themselves, as they do without panes. Its geometry and
|
|
482
|
+
* Shadow stay: the frame's edge is where it was, and the Header still stands over the Sider. The pane's
|
|
483
|
+
* paint is inline and reads these properties on the pane itself, so they are set there. Families
|
|
484
|
+
* without such a band match nothing here.
|
|
482
485
|
*/
|
|
483
|
-
.shell-sider-full:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"], [data-phi-region-key="header_bottom"])
|
|
484
|
-
.shell-sider-embedded:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"])
|
|
485
|
-
.shell-sider-embedded:has(> [data-phi-region-key="header_bottom"]
|
|
486
|
-
[data-phi-shell-chrome-panes="true"]:has(> [data-phi-region-key="sider_left"]
|
|
487
|
-
[data-phi-shell-chrome-panes="true"]:has(> [data-phi-region-key="sider_right"]
|
|
488
|
-
[data-phi-shell-chrome-panes="true"]:has(> :is([data-phi-region-key="footer_top"], [data-phi-region-key="footer_main"], [data-phi-region-key="footer_bottom"])
|
|
486
|
+
.shell-sider-full:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"], [data-phi-region-key="header_bottom"])[data-phi-shell-own-ground]) > .phi-shell-chrome-pane--header,
|
|
487
|
+
.shell-sider-embedded:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"])[data-phi-shell-own-ground]) > .phi-shell-chrome-pane--header,
|
|
488
|
+
.shell-sider-embedded:has(> [data-phi-region-key="header_bottom"][data-phi-shell-own-ground]) > .phi-shell-chrome-pane--header-bottom,
|
|
489
|
+
[data-phi-shell-chrome-panes="true"]:has(> [data-phi-region-key="sider_left"][data-phi-shell-own-ground]) > .phi-shell-chrome-pane--sider,
|
|
490
|
+
[data-phi-shell-chrome-panes="true"]:has(> [data-phi-region-key="sider_right"][data-phi-shell-own-ground]) > .phi-shell-chrome-pane--sider-right,
|
|
491
|
+
[data-phi-shell-chrome-panes="true"]:has(> :is([data-phi-region-key="footer_top"], [data-phi-region-key="footer_main"], [data-phi-region-key="footer_bottom"])[data-phi-shell-own-ground]) > .phi-shell-chrome-pane--footer {
|
|
489
492
|
--phi-shell-chrome-image: none;
|
|
490
493
|
--phi-shell-chrome-color: transparent;
|
|
491
494
|
--phi-shell-chrome-filter: none;
|
|
492
495
|
}
|
|
493
496
|
|
|
494
|
-
.shell-sider-full:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"], [data-phi-region-key="header_bottom"])
|
|
497
|
+
.shell-sider-full:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"], [data-phi-region-key="header_bottom"])[data-phi-shell-own-ground])
|
|
495
498
|
> .phi-cms-region-shell[data-phi-shell-chrome="true"]:is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"], [data-phi-region-key="header_bottom"]),
|
|
496
|
-
.shell-sider-embedded:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"])
|
|
499
|
+
.shell-sider-embedded:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"])[data-phi-shell-own-ground])
|
|
497
500
|
> .phi-cms-region-shell[data-phi-shell-chrome="true"]:is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"]),
|
|
498
|
-
[data-phi-shell-chrome-panes="true"]:has(> :is([data-phi-region-key="footer_top"], [data-phi-region-key="footer_main"], [data-phi-region-key="footer_bottom"])
|
|
501
|
+
[data-phi-shell-chrome-panes="true"]:has(> :is([data-phi-region-key="footer_top"], [data-phi-region-key="footer_main"], [data-phi-region-key="footer_bottom"])[data-phi-shell-own-ground])
|
|
499
502
|
> .phi-cms-region-shell[data-phi-shell-chrome="true"]:is([data-phi-region-key="footer_top"], [data-phi-region-key="footer_main"], [data-phi-region-key="footer_bottom"]) {
|
|
500
503
|
--phi-region-chrome-image: var(--phi-shell-chrome-image, none);
|
|
501
504
|
--phi-region-chrome-color: var(--phi-shell-chrome-color, transparent);
|
|
@@ -503,6 +506,26 @@
|
|
|
503
506
|
--phi-region-chrome-attachment: fixed;
|
|
504
507
|
}
|
|
505
508
|
|
|
509
|
+
/*
|
|
510
|
+
* A bar inside the band (`box`: the band's top Layout paints the ground, not the band) takes the pane's
|
|
511
|
+
* Shadow away as well. The Shadow marks the frame's edge across the full width, and the frame has stepped
|
|
512
|
+
* aside for a bar that is narrower and wears its own edge. A tone or a band's own Background keeps it.
|
|
513
|
+
*/
|
|
514
|
+
.shell-sider-full:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"], [data-phi-region-key="header_bottom"])[data-phi-shell-own-ground="box"]) > .phi-shell-chrome-pane--header,
|
|
515
|
+
.shell-sider-embedded:has(> :is([data-phi-region-key="header_top"], [data-phi-region-key="header_main"])[data-phi-shell-own-ground="box"]) > .phi-shell-chrome-pane--header,
|
|
516
|
+
.shell-sider-embedded:has(> [data-phi-region-key="header_bottom"][data-phi-shell-own-ground="box"]) > .phi-shell-chrome-pane--header-bottom {
|
|
517
|
+
--phi-shell-chrome-shadow-header: none;
|
|
518
|
+
}
|
|
519
|
+
[data-phi-shell-chrome-panes="true"]:has(> [data-phi-region-key="sider_left"][data-phi-shell-own-ground="box"]) > .phi-shell-chrome-pane--sider {
|
|
520
|
+
--phi-shell-chrome-shadow-sider-left: none;
|
|
521
|
+
}
|
|
522
|
+
[data-phi-shell-chrome-panes="true"]:has(> [data-phi-region-key="sider_right"][data-phi-shell-own-ground="box"]) > .phi-shell-chrome-pane--sider-right {
|
|
523
|
+
--phi-shell-chrome-shadow-sider-right: none;
|
|
524
|
+
}
|
|
525
|
+
[data-phi-shell-chrome-panes="true"]:has(> :is([data-phi-region-key="footer_top"], [data-phi-region-key="footer_main"], [data-phi-region-key="footer_bottom"])[data-phi-shell-own-ground="box"]) > .phi-shell-chrome-pane--footer {
|
|
526
|
+
--phi-shell-chrome-shadow-footer: none;
|
|
527
|
+
}
|
|
528
|
+
|
|
506
529
|
/* ---------------------------------------------------------------------------------------------
|
|
507
530
|
Revealing `header_top` (SHELL.md "Region visibility per Page")
|
|
508
531
|
|
|
@@ -772,3 +795,140 @@
|
|
|
772
795
|
transition: none !important;
|
|
773
796
|
}
|
|
774
797
|
}
|
|
798
|
+
|
|
799
|
+
/*
|
|
800
|
+
* The Search Box (SEARCH.md): the input, a magnifier alone that opens into one (`icon-only`), or `auto` -- both drawn, and the
|
|
801
|
+
* Shell's phone decides which shows, as it does for the Header Navigation's menu button above.
|
|
802
|
+
*/
|
|
803
|
+
.phi-search-box {
|
|
804
|
+
display: flex;
|
|
805
|
+
align-items: center;
|
|
806
|
+
justify-content: flex-end;
|
|
807
|
+
min-width: 0;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
.phi-search-box__field,
|
|
811
|
+
.phi-search-box__form {
|
|
812
|
+
display: block;
|
|
813
|
+
flex: 1 1 auto;
|
|
814
|
+
min-width: 0;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
.phi-search-box--input,
|
|
818
|
+
.phi-search-box--auto {
|
|
819
|
+
width: 100%;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
.phi-search-box__magnifier {
|
|
823
|
+
display: inline-flex;
|
|
824
|
+
align-items: center;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.phi-search-box--auto > .phi-search-box__magnifier,
|
|
828
|
+
.phi-search-box--auto > .phi-search-box__expand {
|
|
829
|
+
display: none;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
/*
|
|
833
|
+
* The magnifier keeps its own width. The Widget fills its slot's inline size as a field does; a magnifier
|
|
834
|
+
* that filled it would push the Widgets beside it away, so the innermost slot around it hugs it instead.
|
|
835
|
+
*/
|
|
836
|
+
.phi-slot-child:has(.phi-search-box--icon-only):not(:has(.phi-slot-child)) {
|
|
837
|
+
width: auto !important;
|
|
838
|
+
flex: 0 0 auto !important;
|
|
839
|
+
min-width: var(--ant-control-height) !important;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/* Opened where it stands: the field grows out of the magnifier. */
|
|
843
|
+
.phi-search-box__expand {
|
|
844
|
+
display: block;
|
|
845
|
+
width: 15rem;
|
|
846
|
+
max-width: 100%;
|
|
847
|
+
animation: phi-search-box-expand 180ms ease-out;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
@keyframes phi-search-box-expand {
|
|
851
|
+
from {
|
|
852
|
+
width: var(--ant-control-height);
|
|
853
|
+
opacity: 0.4;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/* Closing plays it backwards, back into the magnifier; the field is removed when it ends. */
|
|
858
|
+
.phi-search-box__expand--closing {
|
|
859
|
+
animation: phi-search-box-collapse 180ms ease-in forwards;
|
|
860
|
+
pointer-events: none;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
@keyframes phi-search-box-collapse {
|
|
864
|
+
to {
|
|
865
|
+
width: var(--ant-control-height);
|
|
866
|
+
opacity: 0.4;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
/*
|
|
871
|
+
* Opened on a phone: a row over the whole band, the field and its close mark, on the page's own ground
|
|
872
|
+
* so the band's widgets do not show through it, light or dark.
|
|
873
|
+
*/
|
|
874
|
+
.phi-search-box__row {
|
|
875
|
+
position: absolute;
|
|
876
|
+
inset: 0;
|
|
877
|
+
z-index: 60;
|
|
878
|
+
display: flex;
|
|
879
|
+
align-items: center;
|
|
880
|
+
gap: var(--ant-padding-xs, 8px);
|
|
881
|
+
padding-inline: var(--ant-padding, 16px);
|
|
882
|
+
background: var(--ant-color-bg-container);
|
|
883
|
+
animation: phi-search-box-row 160ms ease-out;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
@keyframes phi-search-box-row {
|
|
887
|
+
from {
|
|
888
|
+
opacity: 0;
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
.phi-search-box__row--closing {
|
|
893
|
+
animation: phi-search-box-row-out 160ms ease-in forwards;
|
|
894
|
+
pointer-events: none;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
@keyframes phi-search-box-row-out {
|
|
898
|
+
to {
|
|
899
|
+
opacity: 0;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
@container phi-render-viewport (width < 768px) {
|
|
904
|
+
.phi-search-box--auto {
|
|
905
|
+
width: auto;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.phi-search-box--auto > .phi-search-box__field {
|
|
909
|
+
display: none;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
.phi-search-box--auto > .phi-search-box__magnifier {
|
|
913
|
+
display: inline-flex;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.phi-search-box--auto > .phi-search-box__expand {
|
|
917
|
+
display: block;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
.phi-slot-child:has(.phi-search-box--auto):not(:has(.phi-slot-child)) {
|
|
921
|
+
width: auto !important;
|
|
922
|
+
flex: 0 0 auto !important;
|
|
923
|
+
min-width: var(--ant-control-height) !important;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
@media (prefers-reduced-motion: reduce) {
|
|
928
|
+
.phi-search-box__expand,
|
|
929
|
+
.phi-search-box__expand--closing,
|
|
930
|
+
.phi-search-box__row,
|
|
931
|
+
.phi-search-box__row--closing {
|
|
932
|
+
animation: none;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
@@ -22,7 +22,7 @@ import type { PhiThemePalette } from "./phi-theme-presets";
|
|
|
22
22
|
* Who may still speak Ant Design directly is a separate question, and `scripts/validate-control-boundaries.mjs`
|
|
23
23
|
* answers it: the alias resolver, the root adapter, the two font helpers and this file.
|
|
24
24
|
*/
|
|
25
|
-
export declare const PHI_THEME_TOKEN_KEYS: readonly ["colorBgContainer", "colorBgElevated", "colorBgMask", "colorBgSpotlight", "colorBorder", "colorBorderSecondary", "colorSplit", "colorFillAlter", "colorFill", "colorBgLayout", "colorFillQuaternary", "colorFillSecondary", "colorFillTertiary", "colorText", "colorTextBase", "colorTextHeading", "colorTextSecondary", "colorTextTertiary", "colorTextQuaternary", "colorTextDescription", "colorTextDisabled", "colorTextLabel", "colorTextPlaceholder", "colorTextLightSolid", "colorPrimary", "colorPrimaryBg", "colorPrimaryBgHover", "colorPrimaryBorder", "colorPrimaryBorderHover", "colorPrimaryHover", "colorPrimaryActive", "colorPrimaryText", "colorPrimaryTextHover", "colorPrimaryTextActive", "colorInfo", "colorInfoBg", "colorInfoBgHover", "colorInfoBorder", "colorInfoBorderHover", "colorInfoText", "colorInfoTextHover", "colorSuccess", "colorSuccessBg", "colorSuccessBgHover", "colorSuccessBorder", "colorSuccessBorderHover", "colorSuccessText", "colorWarning", "colorWarningBg", "colorWarningBgHover", "colorWarningBorder", "colorWarningBorderHover", "colorWarningText", "colorError", "colorErrorBg", "colorErrorText", "colorErrorTextHover", "colorErrorTextActive", "colorLink", "colorLinkHover", "colorLinkActive", "padding", "paddingXXS", "paddingXS", "paddingSM", "paddingMD", "paddingLG", "paddingXL", "margin", "marginXXS", "marginXS", "marginSM", "marginMD", "marginLG", "marginXL", "marginXXL", "sizeXS", "sizeSM", "sizeMD", "sizeLG", "borderRadius", "borderRadiusXS", "borderRadiusSM", "borderRadiusLG", "borderRadiusOuter", "lineWidth", "lineType", "boxShadow", "boxShadowSecondary", "boxShadowTertiary", "controlHeight", "controlHeightXS", "controlHeightSM", "controlHeightLG", "fontFamily", "fontFamilyCode", "fontSize", "fontSizeSM", "fontSizeLG", "fontSizeXL", "fontSizeHeading1", "fontSizeHeading2", "fontSizeHeading3", "fontSizeHeading4", "fontSizeHeading5", "fontWeightStrong", "lineHeight", "lineHeightSM", "lineHeightLG", "lineHeightHeading1", "lineHeightHeading2", "lineHeightHeading3", "lineHeightHeading4", "lineHeightHeading5", "motionDurationMid", "motionDurationSlow", "motionEaseInOut", "motionEaseOut"];
|
|
25
|
+
export declare const PHI_THEME_TOKEN_KEYS: readonly ["colorBgContainer", "colorBgElevated", "colorBgMask", "colorBgSpotlight", "colorBorder", "colorBorderSecondary", "colorSplit", "colorFillAlter", "colorFill", "colorBgLayout", "colorFillQuaternary", "colorFillSecondary", "colorFillTertiary", "colorText", "colorTextBase", "colorTextHeading", "colorTextSecondary", "colorTextTertiary", "colorTextQuaternary", "colorTextDescription", "colorTextDisabled", "colorTextLabel", "colorTextPlaceholder", "colorTextLightSolid", "colorPrimary", "colorPrimaryBg", "colorPrimaryBgHover", "colorPrimaryBorder", "colorPrimaryBorderHover", "colorPrimaryHover", "colorPrimaryActive", "colorPrimaryText", "colorPrimaryTextHover", "colorPrimaryTextActive", "colorInfo", "colorInfoBg", "colorInfoBgHover", "colorInfoBorder", "colorInfoBorderHover", "colorInfoText", "colorInfoTextHover", "colorSuccess", "colorSuccessBg", "colorSuccessBgHover", "colorSuccessBorder", "colorSuccessBorderHover", "colorSuccessText", "colorWarning", "colorWarningBg", "colorWarningBgHover", "colorWarningBorder", "colorWarningBorderHover", "colorWarningText", "colorError", "colorErrorBg", "colorErrorText", "colorErrorTextHover", "colorErrorTextActive", "colorLink", "colorLinkHover", "colorLinkActive", "padding", "paddingXXS", "paddingXS", "paddingSM", "paddingMD", "paddingLG", "paddingXL", "margin", "marginXXS", "marginXS", "marginSM", "marginMD", "marginLG", "marginXL", "marginXXL", "sizeXS", "sizeSM", "sizeMD", "sizeLG", "borderRadius", "borderRadiusXS", "borderRadiusSM", "borderRadiusLG", "borderRadiusOuter", "lineWidth", "lineWidthBold", "lineType", "boxShadow", "boxShadowSecondary", "boxShadowTertiary", "controlHeight", "controlHeightXS", "controlHeightSM", "controlHeightLG", "fontFamily", "fontFamilyCode", "fontSize", "fontSizeSM", "fontSizeLG", "fontSizeXL", "fontSizeHeading1", "fontSizeHeading2", "fontSizeHeading3", "fontSizeHeading4", "fontSizeHeading5", "fontWeightStrong", "lineHeight", "lineHeightSM", "lineHeightLG", "lineHeightHeading1", "lineHeightHeading2", "lineHeightHeading3", "lineHeightHeading4", "lineHeightHeading5", "motionDurationMid", "motionDurationSlow", "motionEaseInOut", "motionEaseOut"];
|
|
26
26
|
/**
|
|
27
27
|
* The names this house adds to Ant Design's set.
|
|
28
28
|
*
|
|
@@ -114,6 +114,8 @@ export const PHI_THEME_TOKEN_KEYS = [
|
|
|
114
114
|
"borderRadiusLG",
|
|
115
115
|
"borderRadiusOuter",
|
|
116
116
|
"lineWidth",
|
|
117
|
+
// The bold rule: an Anchor's rail and the like. Content set beside such a rail lines up with it.
|
|
118
|
+
"lineWidthBold",
|
|
117
119
|
"lineType",
|
|
118
120
|
"boxShadow",
|
|
119
121
|
"boxShadowSecondary",
|
|
@@ -83,6 +83,11 @@ export type PhiRenderableBlockViewportEffect = {
|
|
|
83
83
|
rangeEnd?: PhiRenderableBlockViewportEffectRangePoint | number | null;
|
|
84
84
|
easing?: PhiRenderableBlockTransitionEasing | null;
|
|
85
85
|
clamp?: boolean | null;
|
|
86
|
+
/**
|
|
87
|
+
* How far the eye stands from a turn about `x` or `y`, in pixels: smaller is deeper. Without it such a
|
|
88
|
+
* turn only foreshortens flat. `0` turns it off; `z` and the other properties ignore it.
|
|
89
|
+
*/
|
|
90
|
+
perspectivePx?: number | null;
|
|
86
91
|
};
|
|
87
92
|
export type PhiRenderableBlockEffects = {
|
|
88
93
|
opacity?: number | null;
|
package/types/table-widget.d.ts
CHANGED
|
@@ -100,11 +100,20 @@ export type PhiTableColumnDefinition = {
|
|
|
100
100
|
tagColorMap?: Readonly<Record<string, PhiTableTagColor>>;
|
|
101
101
|
tagVariant?: PhiTableTagVariant;
|
|
102
102
|
};
|
|
103
|
-
export type PhiTableColumnEditorControl = "switch" | "checkbox" | "select" | "radio" | "segmented" | "multi-select" | "checkbox-group" | "icon-picker"
|
|
103
|
+
export type PhiTableColumnEditorControl = "switch" | "checkbox" | "select" | "radio" | "segmented" | "multi-select" | "checkbox-group" | "icon-picker"
|
|
104
|
+
/** A `string` field edited over several lines: the cell grows with its text and wraps it. */
|
|
105
|
+
| "textarea";
|
|
104
106
|
type PhiTableFilterCommon = {
|
|
105
107
|
key: string;
|
|
106
108
|
label: string;
|
|
107
109
|
labelPlacement?: "above" | "inline" | "none";
|
|
110
|
+
/**
|
|
111
|
+
* What the filter does, for a reader the label does not tell enough -- already in their language.
|
|
112
|
+
*
|
|
113
|
+
* Carried the way every Control carries a description: the information glyph after a label that is
|
|
114
|
+
* shown, the hover text of the Control itself where `labelPlacement` is `none`.
|
|
115
|
+
*/
|
|
116
|
+
description?: string;
|
|
108
117
|
};
|
|
109
118
|
export type PhiTableFilterDefinition = PhiTableFilterCommon & ({
|
|
110
119
|
type: "text";
|