@phis/ui 0.6.10 → 0.7.0
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-area-render-scope.d.ts +2 -0
- package/components/cms/phi-cms-area-render-scope.js +1 -1
- package/components/cms/phi-cms-error-page.js +1 -1
- package/components/cms/phi-cms-page-render-scope.d.ts +0 -1
- package/components/cms/phi-cms-page-render-scope.js +1 -1
- package/components/cms/phi-cms-root-layout.js +1 -0
- package/components/cms/phi-cms-runtime-registry.d.ts +4 -4
- package/components/cms/phi-cms-runtime-registry.js +4 -4
- package/components/controls/phi-padding-control.js +18 -5
- package/components/layouts/layout-definitions.d.ts +8 -0
- package/components/regions/presets/phi-base-page-column.js +1 -2
- package/components/regions/presets/phi-header-top-actions-layout.d.ts +2 -2
- package/components/regions/presets/phi-header-top-actions-layout.js +2 -4
- package/components/regions/presets/phi-settings-page-shell-tree.js +0 -2
- package/components/widgets/label-sets/padding.js +2 -0
- package/components/widgets/label-sets/region.js +2 -0
- package/components/widgets/label-types/padding.d.ts +2 -0
- package/components/widgets/label-types/padding.js +1 -0
- package/components/widgets/label-types/region.d.ts +2 -0
- package/components/widgets/label-types/region.js +1 -0
- package/components/widgets/label-types/revisions.js +2 -2
- package/components/workspace/catalog-state.d.ts +17 -1
- package/components/workspace/catalog-store.js +1 -0
- package/gateway/dashboard-cards-route.js +4 -9
- package/gateway/form-handler-resolution.js +10 -34
- package/gateway/navigation-target-route.js +4 -10
- package/gateway/page-references-route.js +3 -8
- package/gateway/site-area.d.ts +43 -6
- package/gateway/site-area.js +70 -17
- package/helpers/cms-area-config.d.ts +36 -14
- package/helpers/cms-area-config.js +72 -26
- package/helpers/cms-dialog.d.ts +0 -1
- package/helpers/cms-dialog.js +0 -1
- package/helpers/cms-layout-defaults.d.ts +4 -0
- package/helpers/cms-layout-defaults.js +14 -17
- package/helpers/cms-region-keys.d.ts +1 -1
- package/helpers/page-layout-check.js +4 -1
- package/next/seo-routes.js +24 -28
- package/package.json +2 -2
- package/plugins/runtime-modules/accounting/presets.d.ts +0 -1
- package/plugins/runtime-modules/accounting/trees/phi-default-accounting-area-preset-tree.js +0 -2
- package/plugins/runtime-modules/admin/presets.d.ts +0 -1
- package/plugins/runtime-modules/admin/trees/phi-default-admin-area-preset-tree.js +0 -2
- package/plugins/runtime-modules/app/presets.d.ts +0 -1
- package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.js +0 -2
- package/plugins/runtime-modules/area-definitions.d.ts +17 -0
- package/plugins/runtime-modules/area-definitions.js +6 -0
- package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +0 -2
- package/plugins/runtime-modules/builder/area-shell-presets.server.d.ts +21 -5
- package/plugins/runtime-modules/builder/area-shell-presets.server.js +171 -63
- package/plugins/runtime-modules/builder/clients/shells-workspace.js +12 -1
- package/plugins/runtime-modules/builder/controller/client.js +2 -0
- package/plugins/runtime-modules/builder/controller/definition.d.ts +1 -0
- package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +2 -3
- package/plugins/runtime-modules/builder/controller/draft-command-controller.js +56 -25
- package/plugins/runtime-modules/builder/controller/draft-status-controller.js +13 -7
- package/plugins/runtime-modules/builder/controller/server-definition.d.ts +1 -0
- package/plugins/runtime-modules/builder/controller/server-definition.js +7 -4
- package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +2 -1
- package/plugins/runtime-modules/builder/controller/workspace-controller.js +9 -3
- package/plugins/runtime-modules/builder/data-providers.d.ts +1 -1
- package/plugins/runtime-modules/builder/definition.d.ts +1 -1
- package/plugins/runtime-modules/builder/developer-workspace-store.js +1 -0
- package/plugins/runtime-modules/builder/page-preset-catalog.server.d.ts +0 -2
- package/plugins/runtime-modules/builder/page-preset-catalog.server.js +0 -16
- package/plugins/runtime-modules/builder/persistence.d.ts +20 -25
- package/plugins/runtime-modules/builder/persistence.js +67 -75
- package/plugins/runtime-modules/builder/services/runtime-modules-table.d.ts +17 -0
- package/plugins/runtime-modules/builder/services/runtime-modules-table.js +79 -2
- package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +0 -1
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.d.ts +0 -1
- package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +1 -10
- package/plugins/runtime-modules/builder/workspace-catalog-actions.d.ts +2 -1
- package/plugins/runtime-modules/builder/workspace-catalog-actions.js +3 -1
- package/plugins/runtime-modules/core/widgets/cascader/authoring.d.ts +1 -1
- package/plugins/runtime-modules/descriptor-compiler.d.ts +16 -2
- package/plugins/runtime-modules/descriptor-compiler.js +69 -13
- package/plugins/runtime-modules/editor/services/releases-table.js +26 -14
- package/plugins/runtime-modules/editor/trees/phi-default-editor-area-preset-tree.js +0 -2
- package/plugins/runtime-modules/groups/definition.d.ts +1 -1
- package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +0 -2
- package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +0 -4
- package/plugins/runtime-modules/revisions/controller/client.js +13 -7
- package/plugins/runtime-modules/revisions/services/table.js +10 -3
- package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +0 -1
- package/plugins/runtime-modules/shell-tree-composition.d.ts +0 -2
- package/plugins/runtime-modules/shell-tree-composition.js +0 -3
- package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +0 -6
- package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +17 -1
- package/server-helpers/area-root-door-warmup.d.ts +5 -2
- package/server-helpers/area-root-door-warmup.js +2 -10
- package/server-helpers/cms-area.d.ts +9 -1
- package/server-helpers/cms-area.js +16 -11
- package/server-helpers/cms-lookup.js +1 -1
- package/server-helpers/cms-request.d.ts +58 -13
- package/server-helpers/cms-request.js +103 -33
- package/server-helpers/cms-root.d.ts +4 -0
- package/server-helpers/cms-root.js +48 -35
- package/server-helpers/cms.d.ts +5 -5
- package/server-helpers/public-login-route.js +4 -9
- package/server-helpers/search-index.js +9 -14
- package/styles/shell.css +12 -0
- package/theme/antd-css-var-contract.d.ts +6 -0
- package/theme/antd-css-var-contract.js +6 -0
- package/theme/phi-theme-tokens.d.ts +3 -2
- package/theme/phi-theme-tokens.js +11 -1
- package/theme/phi-theme.d.ts +2 -0
- package/theme/phi-theme.js +2 -0
- package/theme/phi-tokens.d.ts +1 -0
- package/theme/phi-tokens.js +7 -0
- package/theme.d.ts +1 -1
- package/theme.js +1 -1
- package/types/cms-module-descriptors.d.ts +26 -1
- package/types/cms-plugins.d.ts +3 -0
- package/types/cms.d.ts +10 -3
package/next/seo-routes.js
CHANGED
|
@@ -2,13 +2,13 @@ import "server-only";
|
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { resolvePhiCmsPageRedirect } from "../components/cms/phi-cms-page-redirect";
|
|
4
4
|
import { getSiteAreaWithPublishedPages } from "../gateway/site-area";
|
|
5
|
-
import {
|
|
5
|
+
import { buildPhiAreaShellPresetConfig, PHI_AREA_META_PUBLIC_DEFAULTS, readPhiAreaMeta, } from "../helpers/cms-area-config";
|
|
6
6
|
import { collectPhiSitemapCandidates, renderPhiRobotsTxt, renderPhiSitemapDocuments, renderPhiSitemapIndexXml, resolvePhiSitePublicBase, } from "../helpers/phi-seo";
|
|
7
7
|
import { createPhiFingerprintCache } from "../helpers/phi-sitemap-cache";
|
|
8
8
|
import { readPhiSiteRuntimeConfigSync } from "../helpers/site-runtime";
|
|
9
|
-
import {
|
|
9
|
+
import { resolvePhiCmsAreaBaseShellPresetBinding, resolvePhiCmsDescriptorCatalog, } from "../plugins/runtime-modules/descriptor-compiler";
|
|
10
10
|
import { getPhiExactSiteArea } from "../server-helpers/cms";
|
|
11
|
-
import {
|
|
11
|
+
import { resolvePhiAreaRouteScope } from "../server-helpers/cms-request";
|
|
12
12
|
import { resolvePhiCmsLookup } from "../server-helpers/cms-lookup";
|
|
13
13
|
import { loadPhiSiteRequestContext } from "../server-helpers/runtime";
|
|
14
14
|
import { fetchSiteLocaleConfig } from "../server-helpers/site-locale";
|
|
@@ -31,16 +31,11 @@ async function loadPhiPublicSeoContext(bridge, { withPublishedPages }) {
|
|
|
31
31
|
const locale = localeConfig.defaultLocale;
|
|
32
32
|
const requestContext = await loadPhiSiteRequestContext(siteKey, locale, "", apiBaseUrl, internalToken);
|
|
33
33
|
const catalog = resolvePhiCmsDescriptorCatalog(bridge.runtimeModuleCatalog);
|
|
34
|
-
|
|
35
|
-
if (!shellBinding) {
|
|
34
|
+
if (!resolvePhiCmsAreaBaseShellPresetBinding(catalog, "public")) {
|
|
36
35
|
return null;
|
|
37
36
|
}
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
presetKey: shellBinding.descriptor.presetKey,
|
|
41
|
-
};
|
|
42
|
-
const { area: areaPreset, publishedPages } = withPublishedPages
|
|
43
|
-
? await getSiteAreaWithPublishedPages({ apiBaseUrl, internalToken, siteKey, locale, sourcePreset })
|
|
37
|
+
const { area: storedArea, publishedPages } = withPublishedPages
|
|
38
|
+
? await getSiteAreaWithPublishedPages({ apiBaseUrl, internalToken, siteKey, locale })
|
|
44
39
|
: {
|
|
45
40
|
area: await getPhiExactSiteArea({
|
|
46
41
|
path: "/",
|
|
@@ -49,18 +44,26 @@ async function loadPhiPublicSeoContext(bridge, { withPublishedPages }) {
|
|
|
49
44
|
internalToken,
|
|
50
45
|
locale,
|
|
51
46
|
cookieHeader: "",
|
|
52
|
-
sourcePreset,
|
|
53
47
|
}),
|
|
54
48
|
publishedPages: [],
|
|
55
49
|
};
|
|
56
|
-
const
|
|
50
|
+
const scope = resolvePhiAreaRouteScope({
|
|
51
|
+
runtimeModuleCatalog: bridge.runtimeModuleCatalog,
|
|
52
|
+
catalog,
|
|
53
|
+
area: "public",
|
|
54
|
+
read: storedArea,
|
|
55
|
+
serverCapabilities: requestContext.serverCapabilities,
|
|
56
|
+
});
|
|
57
|
+
// The stored answer, else what the effective shell proposes (`settings`), as the Page render reads it.
|
|
58
|
+
const meta = readPhiAreaMeta(scope.structure ? scope.structure.preset.preset.config : buildPhiAreaShellPresetConfig(scope.shellBinding.descriptor.settings));
|
|
57
59
|
const publicBase = resolvePhiSitePublicBase(requestContext.site.publicUrl, readPhiSiteRuntimeConfigSync().site.publicUrl);
|
|
58
60
|
return {
|
|
59
61
|
bridgeRuntime,
|
|
60
62
|
requestContext,
|
|
61
63
|
locale,
|
|
62
64
|
publicBase,
|
|
63
|
-
|
|
65
|
+
storedArea,
|
|
66
|
+
scope,
|
|
64
67
|
publishedPages,
|
|
65
68
|
sitemapEnabled: Boolean(publicBase)
|
|
66
69
|
&& (meta?.index ?? PHI_AREA_META_PUBLIC_DEFAULTS.index)
|
|
@@ -101,15 +104,8 @@ async function filterPhiSitemapCandidates(bridge, context, candidates) {
|
|
|
101
104
|
await Promise.all(Array.from({ length: PHI_SITEMAP_RESOLVE_CONCURRENCY }, work));
|
|
102
105
|
return candidates.filter((_candidate, index) => listed[index]);
|
|
103
106
|
}
|
|
104
|
-
async function buildPhiSitemapDocuments(bridge, context
|
|
105
|
-
const { requestContext,
|
|
106
|
-
const routeTable = compilePhiCmsActiveRouteTable({
|
|
107
|
-
catalog: resolvePhiCmsDescriptorCatalog(bridge.runtimeModuleCatalog),
|
|
108
|
-
area: "public",
|
|
109
|
-
activeModuleIds,
|
|
110
|
-
publicRoutePaths: readPhiAreaPublicRoutePaths(areaPreset?.preset.preset.config),
|
|
111
|
-
landingSelection: readPhiAreaLandingSelection(areaPreset?.preset.preset.config),
|
|
112
|
-
});
|
|
107
|
+
async function buildPhiSitemapDocuments(bridge, context) {
|
|
108
|
+
const { requestContext, scope: { routeTable }, publishedPages } = context;
|
|
113
109
|
const candidates = collectPhiSitemapCandidates({
|
|
114
110
|
moduleRoutes: [...routeTable.exactByPath].map(([path, descriptor]) => [path, descriptor]),
|
|
115
111
|
publishedPages,
|
|
@@ -130,11 +126,12 @@ async function buildPhiSitemapDocuments(bridge, context, activeModuleIds) {
|
|
|
130
126
|
* What it leaves out -- the installed Module catalog -- changes only with a new Site process, and a
|
|
131
127
|
* new process starts with an empty cache.
|
|
132
128
|
*/
|
|
133
|
-
function buildPhiSitemapFingerprint(context
|
|
129
|
+
function buildPhiSitemapFingerprint(context) {
|
|
134
130
|
return createHash("sha256").update(JSON.stringify({
|
|
135
131
|
publishedPages: context.publishedPages,
|
|
136
|
-
area: context.
|
|
137
|
-
|
|
132
|
+
area: context.scope.structure?.preset ?? null,
|
|
133
|
+
modules: context.storedArea?.modules ?? null,
|
|
134
|
+
activeModuleIds: [...context.scope.activeModuleIds].sort(),
|
|
138
135
|
publicBase: context.publicBase,
|
|
139
136
|
availableLocales: context.requestContext.site.availableLocales.map((option) => option.code),
|
|
140
137
|
defaultLocale: context.requestContext.site.defaultLocale,
|
|
@@ -158,8 +155,7 @@ export function buildPhiSitemapRouteHandler({ bridge }) {
|
|
|
158
155
|
if (!context?.sitemapEnabled || !publicBase) {
|
|
159
156
|
return new Response("Not Found", { status: 404, headers: { "cache-control": "no-store" } });
|
|
160
157
|
}
|
|
161
|
-
const
|
|
162
|
-
const documents = await cache.resolve(buildPhiSitemapFingerprint(context, activeModuleIds), () => buildPhiSitemapDocuments(bridge, { ...context, publicBase }, activeModuleIds));
|
|
158
|
+
const documents = await cache.resolve(buildPhiSitemapFingerprint(context), () => buildPhiSitemapDocuments(bridge, { ...context, publicBase }));
|
|
163
159
|
/*
|
|
164
160
|
* One file answers on its own address. More than one -- above 50,000 URLs or 45 MB -- turns
|
|
165
161
|
* `/sitemap.xml` into an index whose parts are the same route with `?part=<n>`, so the Site needs no
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phis/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
"@lexical/rich-text": "0.50.0",
|
|
522
522
|
"@lexical/selection": "0.50.0",
|
|
523
523
|
"@lexical/utils": "0.50.0",
|
|
524
|
-
"@phis/contracts": "^0.
|
|
524
|
+
"@phis/contracts": "^0.8.0",
|
|
525
525
|
"dayjs": "^1.11.23",
|
|
526
526
|
"dom-serializer": "^2.0.0",
|
|
527
527
|
"htmlparser2": "^10.1.0",
|
|
@@ -6,7 +6,6 @@ export declare const PHI_ACCOUNTING_RUNTIME_MODULE_AREA_SHELLS: {
|
|
|
6
6
|
area: "accounting";
|
|
7
7
|
loadTree: ({ page, runtime }: PhiCmsDescriptorBuildContext) => Promise<{
|
|
8
8
|
pageMeta: import("../../../types").PhiCmsResolvedPageMeta | null | undefined;
|
|
9
|
-
runtimeModuleIds: `${string}/${string}`[] | null | undefined;
|
|
10
9
|
regions: import("../../../types").PhiCmsRegionNode[];
|
|
11
10
|
overlays: import("../../../types").PhiCmsOverlayNode[];
|
|
12
11
|
layoutNodes: import("../../../types").PhiCmsLayoutNode[];
|
|
@@ -2,7 +2,6 @@ import { createPhiPresetCmsInstanceIdMap } from "../../../../types/cms-instance-
|
|
|
2
2
|
import { PHI_ACCOUNTING_RUNTIME_MODULE_ID } from "../ids";
|
|
3
3
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
4
4
|
import { buildPhiAreaShellHeaderNodes, buildPhiAreaShellSiderLeftNodes, concatPhiAreaShellPresetNodes, } from "../../../../components/regions/presets/phi-area-shell-preset-nodes";
|
|
5
|
-
import { createPhiDefaultAreaRuntimeModuleIds } from "../../area-module-defaults";
|
|
6
5
|
/*
|
|
7
6
|
* The staff shell, as Admin's: the header bar with the Page title as a caption, the Tour button and the
|
|
8
7
|
* Account, and the sidebar on `accounting:sidebar`, composed over the Site's shell in `../presets.ts`.
|
|
@@ -35,7 +34,6 @@ export async function buildPhiDefaultAccountingAreaPresetTree({ page, runtime, }
|
|
|
35
34
|
const nodes = createPhiCmsPresetNodes(page);
|
|
36
35
|
return {
|
|
37
36
|
page: nodes.page(),
|
|
38
|
-
runtimeModuleIds: createPhiDefaultAreaRuntimeModuleIds("accounting"),
|
|
39
37
|
overlays: [],
|
|
40
38
|
...concatPhiAreaShellPresetNodes(buildPhiAreaShellHeaderNodes({
|
|
41
39
|
nodes,
|
|
@@ -6,7 +6,6 @@ export declare const PHI_ADMIN_RUNTIME_MODULE_AREA_SHELLS: {
|
|
|
6
6
|
area: "admin";
|
|
7
7
|
loadTree: ({ page, runtime }: PhiCmsDescriptorBuildContext) => Promise<{
|
|
8
8
|
pageMeta: import("../../../types").PhiCmsResolvedPageMeta | null | undefined;
|
|
9
|
-
runtimeModuleIds: `${string}/${string}`[] | null | undefined;
|
|
10
9
|
regions: import("../../../types").PhiCmsRegionNode[];
|
|
11
10
|
overlays: import("../../../types").PhiCmsOverlayNode[];
|
|
12
11
|
layoutNodes: import("../../../types").PhiCmsLayoutNode[];
|
|
@@ -2,7 +2,6 @@ import { createPhiPresetCmsInstanceIdMap } from "../../../../types/cms-instance-
|
|
|
2
2
|
import { PHI_ADMIN_RUNTIME_MODULE_ID } from "../ids";
|
|
3
3
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
4
4
|
import { buildPhiAreaShellHeaderNodes, buildPhiAreaShellSiderLeftNodes, concatPhiAreaShellPresetNodes, } from "../../../../components/regions/presets/phi-area-shell-preset-nodes";
|
|
5
|
-
import { createPhiDefaultAreaRuntimeModuleIds } from "../../area-module-defaults";
|
|
6
5
|
const SYNTHETIC_ADMIN_REGION_IDS = {
|
|
7
6
|
regionHeaderTop: -126,
|
|
8
7
|
regionSiderLeft: -130,
|
|
@@ -30,7 +29,6 @@ export async function buildPhiDefaultAdminAreaPresetTree({ page, runtime, }) {
|
|
|
30
29
|
const nodes = createPhiCmsPresetNodes(page);
|
|
31
30
|
return {
|
|
32
31
|
page: nodes.page(),
|
|
33
|
-
runtimeModuleIds: createPhiDefaultAreaRuntimeModuleIds("admin"),
|
|
34
32
|
overlays: [],
|
|
35
33
|
...concatPhiAreaShellPresetNodes(buildPhiAreaShellHeaderNodes({
|
|
36
34
|
nodes,
|
|
@@ -6,7 +6,6 @@ export declare const PHI_APP_RUNTIME_MODULE_AREA_SHELLS: {
|
|
|
6
6
|
area: "app";
|
|
7
7
|
loadTree: ({ page, runtime }: PhiCmsDescriptorBuildContext) => Promise<{
|
|
8
8
|
pageMeta: import("../../../types").PhiCmsResolvedPageMeta | null | undefined;
|
|
9
|
-
runtimeModuleIds: `${string}/${string}`[] | null | undefined;
|
|
10
9
|
regions: import("../../../types").PhiCmsRegionNode[];
|
|
11
10
|
overlays: import("../../../types").PhiCmsOverlayNode[];
|
|
12
11
|
layoutNodes: import("../../../types").PhiCmsLayoutNode[];
|
|
@@ -2,7 +2,6 @@ import { createPhiPresetCmsInstanceIdMap } from "../../../../types/cms-instance-
|
|
|
2
2
|
import { PHI_APP_RUNTIME_MODULE_ID } from "../ids";
|
|
3
3
|
import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
|
|
4
4
|
import { buildPhiAreaShellSiderLeftNodes } from "../../../../components/regions/presets/phi-area-shell-preset-nodes";
|
|
5
|
-
import { createPhiDefaultAreaRuntimeModuleIds } from "../../area-module-defaults";
|
|
6
5
|
const SYNTHETIC_APP_REGION_IDS = {
|
|
7
6
|
regionSiderLeft: -160,
|
|
8
7
|
};
|
|
@@ -33,7 +32,6 @@ export async function buildPhiDefaultAppAreaPresetTree({ page, runtime, }) {
|
|
|
33
32
|
const nodes = createPhiCmsPresetNodes(page);
|
|
34
33
|
return {
|
|
35
34
|
page,
|
|
36
|
-
runtimeModuleIds: createPhiDefaultAreaRuntimeModuleIds("app"),
|
|
37
35
|
overlays: [],
|
|
38
36
|
...buildPhiAreaShellSiderLeftNodes({
|
|
39
37
|
nodes,
|
|
@@ -3,6 +3,7 @@ export declare const PHI_PUBLIC_RUNTIME_AREA_DEFINITIONS: {
|
|
|
3
3
|
area: "public";
|
|
4
4
|
baseModuleId: `${string}/${string}`;
|
|
5
5
|
shellPresetKey: string;
|
|
6
|
+
shellProviders: "module";
|
|
6
7
|
accessPolicy: {
|
|
7
8
|
readonly access: "anyone";
|
|
8
9
|
};
|
|
@@ -48,6 +49,7 @@ export declare const PHI_APP_RUNTIME_AREA_DEFINITIONS: {
|
|
|
48
49
|
area: "app";
|
|
49
50
|
baseModuleId: `${string}/${string}`;
|
|
50
51
|
shellPresetKey: string;
|
|
52
|
+
shellProviders: "module";
|
|
51
53
|
accessPolicy: {
|
|
52
54
|
readonly access: "authenticated";
|
|
53
55
|
};
|
|
@@ -104,6 +106,7 @@ export declare const PHI_ACCOUNTING_RUNTIME_AREA_DEFINITIONS: {
|
|
|
104
106
|
area: "accounting";
|
|
105
107
|
baseModuleId: `${string}/${string}`;
|
|
106
108
|
shellPresetKey: string;
|
|
109
|
+
shellProviders: "base";
|
|
107
110
|
accessPolicy: {
|
|
108
111
|
readonly access: "roles";
|
|
109
112
|
readonly providerId: "@phis/server/core";
|
|
@@ -144,6 +147,7 @@ export declare const PHI_ADMIN_RUNTIME_AREA_DEFINITIONS: {
|
|
|
144
147
|
area: "admin";
|
|
145
148
|
baseModuleId: `${string}/${string}`;
|
|
146
149
|
shellPresetKey: string;
|
|
150
|
+
shellProviders: "base";
|
|
147
151
|
accessPolicy: {
|
|
148
152
|
readonly access: "roles";
|
|
149
153
|
readonly providerId: "@phis/server/core";
|
|
@@ -196,6 +200,7 @@ export declare const PHI_EDITOR_RUNTIME_AREA_DEFINITIONS: {
|
|
|
196
200
|
area: "editor";
|
|
197
201
|
baseModuleId: `${string}/${string}`;
|
|
198
202
|
shellPresetKey: string;
|
|
203
|
+
shellProviders: "base";
|
|
199
204
|
accessPolicy: {
|
|
200
205
|
readonly access: "roles";
|
|
201
206
|
readonly providerId: "@phis/server/core";
|
|
@@ -215,6 +220,7 @@ export declare const PHI_ALL_RUNTIME_AREA_DEFINITIONS: ({
|
|
|
215
220
|
area: "public";
|
|
216
221
|
baseModuleId: `${string}/${string}`;
|
|
217
222
|
shellPresetKey: string;
|
|
223
|
+
shellProviders: "module";
|
|
218
224
|
accessPolicy: {
|
|
219
225
|
readonly access: "anyone";
|
|
220
226
|
};
|
|
@@ -258,6 +264,7 @@ export declare const PHI_ALL_RUNTIME_AREA_DEFINITIONS: ({
|
|
|
258
264
|
area: "app";
|
|
259
265
|
baseModuleId: `${string}/${string}`;
|
|
260
266
|
shellPresetKey: string;
|
|
267
|
+
shellProviders: "module";
|
|
261
268
|
accessPolicy: {
|
|
262
269
|
readonly access: "authenticated";
|
|
263
270
|
};
|
|
@@ -313,6 +320,7 @@ export declare const PHI_ALL_RUNTIME_AREA_DEFINITIONS: ({
|
|
|
313
320
|
area: "accounting";
|
|
314
321
|
baseModuleId: `${string}/${string}`;
|
|
315
322
|
shellPresetKey: string;
|
|
323
|
+
shellProviders: "base";
|
|
316
324
|
accessPolicy: {
|
|
317
325
|
readonly access: "roles";
|
|
318
326
|
readonly providerId: "@phis/server/core";
|
|
@@ -352,6 +360,7 @@ export declare const PHI_ALL_RUNTIME_AREA_DEFINITIONS: ({
|
|
|
352
360
|
area: "admin";
|
|
353
361
|
baseModuleId: `${string}/${string}`;
|
|
354
362
|
shellPresetKey: string;
|
|
363
|
+
shellProviders: "base";
|
|
355
364
|
accessPolicy: {
|
|
356
365
|
readonly access: "roles";
|
|
357
366
|
readonly providerId: "@phis/server/core";
|
|
@@ -403,6 +412,7 @@ export declare const PHI_ALL_RUNTIME_AREA_DEFINITIONS: ({
|
|
|
403
412
|
area: "editor";
|
|
404
413
|
baseModuleId: `${string}/${string}`;
|
|
405
414
|
shellPresetKey: string;
|
|
415
|
+
shellProviders: "base";
|
|
406
416
|
accessPolicy: {
|
|
407
417
|
readonly access: "roles";
|
|
408
418
|
readonly providerId: "@phis/server/core";
|
|
@@ -421,6 +431,7 @@ export declare const PHI_ALL_RUNTIME_AREA_DEFINITIONS: ({
|
|
|
421
431
|
area: "builder";
|
|
422
432
|
baseModuleId: `${string}/${string}`;
|
|
423
433
|
shellPresetKey: string;
|
|
434
|
+
shellProviders: "base";
|
|
424
435
|
accessPolicy: {
|
|
425
436
|
readonly access: "roles";
|
|
426
437
|
readonly providerId: "@phis/server/core";
|
|
@@ -481,6 +492,7 @@ export declare function resolvePhiRuntimeAreaDefinition(area: PhiCmsAreaDefiniti
|
|
|
481
492
|
area: "public";
|
|
482
493
|
baseModuleId: `${string}/${string}`;
|
|
483
494
|
shellPresetKey: string;
|
|
495
|
+
shellProviders: "module";
|
|
484
496
|
accessPolicy: {
|
|
485
497
|
readonly access: "anyone";
|
|
486
498
|
};
|
|
@@ -524,6 +536,7 @@ export declare function resolvePhiRuntimeAreaDefinition(area: PhiCmsAreaDefiniti
|
|
|
524
536
|
area: "app";
|
|
525
537
|
baseModuleId: `${string}/${string}`;
|
|
526
538
|
shellPresetKey: string;
|
|
539
|
+
shellProviders: "module";
|
|
527
540
|
accessPolicy: {
|
|
528
541
|
readonly access: "authenticated";
|
|
529
542
|
};
|
|
@@ -579,6 +592,7 @@ export declare function resolvePhiRuntimeAreaDefinition(area: PhiCmsAreaDefiniti
|
|
|
579
592
|
area: "accounting";
|
|
580
593
|
baseModuleId: `${string}/${string}`;
|
|
581
594
|
shellPresetKey: string;
|
|
595
|
+
shellProviders: "base";
|
|
582
596
|
accessPolicy: {
|
|
583
597
|
readonly access: "roles";
|
|
584
598
|
readonly providerId: "@phis/server/core";
|
|
@@ -618,6 +632,7 @@ export declare function resolvePhiRuntimeAreaDefinition(area: PhiCmsAreaDefiniti
|
|
|
618
632
|
area: "admin";
|
|
619
633
|
baseModuleId: `${string}/${string}`;
|
|
620
634
|
shellPresetKey: string;
|
|
635
|
+
shellProviders: "base";
|
|
621
636
|
accessPolicy: {
|
|
622
637
|
readonly access: "roles";
|
|
623
638
|
readonly providerId: "@phis/server/core";
|
|
@@ -669,6 +684,7 @@ export declare function resolvePhiRuntimeAreaDefinition(area: PhiCmsAreaDefiniti
|
|
|
669
684
|
area: "editor";
|
|
670
685
|
baseModuleId: `${string}/${string}`;
|
|
671
686
|
shellPresetKey: string;
|
|
687
|
+
shellProviders: "base";
|
|
672
688
|
accessPolicy: {
|
|
673
689
|
readonly access: "roles";
|
|
674
690
|
readonly providerId: "@phis/server/core";
|
|
@@ -687,6 +703,7 @@ export declare function resolvePhiRuntimeAreaDefinition(area: PhiCmsAreaDefiniti
|
|
|
687
703
|
area: "builder";
|
|
688
704
|
baseModuleId: `${string}/${string}`;
|
|
689
705
|
shellPresetKey: string;
|
|
706
|
+
shellProviders: "base";
|
|
690
707
|
accessPolicy: {
|
|
691
708
|
readonly access: "roles";
|
|
692
709
|
readonly providerId: "@phis/server/core";
|
|
@@ -154,6 +154,7 @@ export const PHI_PUBLIC_RUNTIME_AREA_DEFINITIONS = [
|
|
|
154
154
|
area: "public",
|
|
155
155
|
baseModuleId: PHI_PUBLIC_RUNTIME_MODULE_ID,
|
|
156
156
|
shellPresetKey: PHI_DEFAULT_PUB_AREA_PRESET_KEY,
|
|
157
|
+
shellProviders: "module",
|
|
157
158
|
accessPolicy: PHI_VIEWER_ACCESS_ANYONE,
|
|
158
159
|
navigationSurfaces: publicNavigationSurfaces,
|
|
159
160
|
},
|
|
@@ -165,6 +166,7 @@ export const PHI_APP_RUNTIME_AREA_DEFINITIONS = [
|
|
|
165
166
|
area: "app",
|
|
166
167
|
baseModuleId: PHI_APP_RUNTIME_MODULE_ID,
|
|
167
168
|
shellPresetKey: "app-area-preset",
|
|
169
|
+
shellProviders: "module",
|
|
168
170
|
accessPolicy: PHI_VIEWER_ACCESS_AUTHENTICATED,
|
|
169
171
|
navigationSurfaces: [
|
|
170
172
|
{
|
|
@@ -237,6 +239,7 @@ export const PHI_ACCOUNTING_RUNTIME_AREA_DEFINITIONS = [
|
|
|
237
239
|
area: "accounting",
|
|
238
240
|
baseModuleId: PHI_ACCOUNTING_RUNTIME_MODULE_ID,
|
|
239
241
|
shellPresetKey: "accounting-area-preset",
|
|
242
|
+
shellProviders: "base",
|
|
240
243
|
accessPolicy: PHI_VIEWER_ACCESS_ACCOUNTING,
|
|
241
244
|
navigationSurfaces: [{
|
|
242
245
|
navKey: "accounting:sidebar",
|
|
@@ -265,6 +268,7 @@ export const PHI_ADMIN_RUNTIME_AREA_DEFINITIONS = [
|
|
|
265
268
|
area: "admin",
|
|
266
269
|
baseModuleId: PHI_ADMIN_RUNTIME_MODULE_ID,
|
|
267
270
|
shellPresetKey: "admin-area-preset",
|
|
271
|
+
shellProviders: "base",
|
|
268
272
|
accessPolicy: PHI_VIEWER_ACCESS_DEVELOPER_TOOLS,
|
|
269
273
|
navigationSurfaces: [
|
|
270
274
|
{
|
|
@@ -311,6 +315,7 @@ export const PHI_EDITOR_RUNTIME_AREA_DEFINITIONS = [
|
|
|
311
315
|
area: "editor",
|
|
312
316
|
baseModuleId: PHI_EDITOR_RUNTIME_MODULE_ID,
|
|
313
317
|
shellPresetKey: "editor-area-preset",
|
|
318
|
+
shellProviders: "base",
|
|
314
319
|
accessPolicy: PHI_VIEWER_ACCESS_CONTENT_EDITING,
|
|
315
320
|
/*
|
|
316
321
|
* The surface, and nothing in it: every Page in this Area is contributed by the Module that owns its
|
|
@@ -331,6 +336,7 @@ const PHI_BUILDER_RUNTIME_AREA_DEFINITIONS = [
|
|
|
331
336
|
area: "builder",
|
|
332
337
|
baseModuleId: PHI_BUILDER_RUNTIME_MODULE_ID,
|
|
333
338
|
shellPresetKey: "builder-area-preset",
|
|
339
|
+
shellProviders: "base",
|
|
334
340
|
accessPolicy: PHI_VIEWER_ACCESS_STRUCTURE_AUTHORING,
|
|
335
341
|
navigationSurfaces: [{
|
|
336
342
|
navKey: "builder:sidebar",
|
|
@@ -278,7 +278,6 @@ export async function buildPhiDefaultBuilderMediaPageTree({ page, runtime, }) {
|
|
|
278
278
|
label: "dev header bottom three column",
|
|
279
279
|
config: {
|
|
280
280
|
balancedSides: false,
|
|
281
|
-
gap: PHI_SPACE.sm,
|
|
282
281
|
leftWidth: 130,
|
|
283
282
|
rightWidth: 130,
|
|
284
283
|
},
|
|
@@ -299,7 +298,6 @@ export async function buildPhiDefaultBuilderMediaPageTree({ page, runtime, }) {
|
|
|
299
298
|
horizontal: "center",
|
|
300
299
|
vertical: "top",
|
|
301
300
|
},
|
|
302
|
-
gap: PHI_SPACE.sm,
|
|
303
301
|
margin: 0,
|
|
304
302
|
},
|
|
305
303
|
}),
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import "server-only";
|
|
2
2
|
import type { PhiCmsTreeControllerSettings } from "../../../types/cms";
|
|
3
|
+
import type { PhiCmsPresetSource } from "../../../types/cms-module-descriptors";
|
|
3
4
|
import type { PhiRuntimeModuleCatalog, PhiRuntimeModuleId } from "../../../types";
|
|
4
5
|
import type { PhiBlockRuntime } from "../../../types/widget-runtime";
|
|
5
6
|
import { type PhiAreaLandingSelection, type PhiAreaRootRoute, type PhiAreaMeta, type PhiPublicRoutePathAssignment } from "../../../helpers/cms-area-config";
|
|
6
7
|
import type { PhiDeveloperBuilderArea, PhiDeveloperBuilderRegionDraft } from "./developer-workspace-types";
|
|
8
|
+
import type { PhiWorkspaceAreaShellState } from "../../../components/workspace/catalog-state";
|
|
7
9
|
type PhiBuilderAreaModulesConfig = {
|
|
8
10
|
moduleIds: PhiRuntimeModuleId[];
|
|
9
11
|
/**
|
|
@@ -47,9 +49,10 @@ export declare function buildPhiBuilderRuntimeModulesConfigForArea(runtime: PhiB
|
|
|
47
49
|
/**
|
|
48
50
|
* The Modules the published Area answers with, as opposed to the draft the Builder edits.
|
|
49
51
|
*
|
|
50
|
-
* Without a published
|
|
51
|
-
*
|
|
52
|
-
*
|
|
52
|
+
* Without a published selection the Area's default list decides, which is what a visitor is served in
|
|
53
|
+
* that case too. Read for the collision dialog, which has to say whether an address it asks to move
|
|
54
|
+
* already stands on the live Site. The structures read answers the published selection only where no
|
|
55
|
+
* Module draft is open; with one open, the live read says what is published.
|
|
53
56
|
*/
|
|
54
57
|
export declare const buildPhiBuilderPublishedRuntimeModuleIdsForArea: (runtime: PhiBlockRuntime, area: PhiDeveloperBuilderArea, runtimeModuleCatalog: PhiRuntimeModuleCatalog) => Promise<PhiRuntimeModuleId[]>;
|
|
55
58
|
export declare function buildPhiBuilderRuntimeModuleIdsForArea(runtime: PhiBlockRuntime, area: PhiDeveloperBuilderArea, runtimeModuleCatalog: PhiRuntimeModuleCatalog): Promise<`${string}/${string}`[]>;
|
|
@@ -81,9 +84,22 @@ export declare function buildPhiBuilderAreaRootRoutesByArea(runtime: PhiBlockRun
|
|
|
81
84
|
export declare function buildPhiBuilderAreaMetaByArea(runtime: PhiBlockRuntime, runtimeModuleCatalog: PhiRuntimeModuleCatalog): Promise<Record<string, PhiAreaMeta | null>>;
|
|
82
85
|
/**
|
|
83
86
|
* What every Area's Shell tells its Controllers, from the same chain the drafts come from: the open
|
|
84
|
-
* structure draft, else what is published, else the code-owned Shell. Carried into every structure save
|
|
85
|
-
*
|
|
87
|
+
* structure draft, else what is published, else the code-owned Shell. Carried into every structure save,
|
|
88
|
+
* which states the tree whole.
|
|
86
89
|
*/
|
|
87
90
|
export declare function buildPhiBuilderAreaControllerSettingsByArea(runtime: PhiBlockRuntime, runtimeModuleCatalog: PhiRuntimeModuleCatalog): Promise<Record<string, PhiCmsTreeControllerSettings>>;
|
|
88
91
|
export declare function buildPhiBuilderStructureShellPresetDraftsByArea(runtime: PhiBlockRuntime, runtimeModuleCatalog: PhiRuntimeModuleCatalog): Promise<Record<PhiDeveloperBuilderArea, Record<string, PhiDeveloperBuilderRegionDraft>>>;
|
|
92
|
+
/**
|
|
93
|
+
* The shell every Area takes, as the identity a structure save, a draft read and a Revisions scope name:
|
|
94
|
+
* the shell of the one Module that brings one and is selected there, else the base Module's.
|
|
95
|
+
*/
|
|
96
|
+
export declare function buildPhiBuilderAreaPresetSourcesByArea(runtime: PhiBlockRuntime, runtimeModuleCatalog: PhiRuntimeModuleCatalog): Promise<Partial<Record<PhiDeveloperBuilderArea, PhiCmsPresetSource>>>;
|
|
97
|
+
/**
|
|
98
|
+
* Per Area, which Modules bring a shell for it and which shell its stored structure stands on.
|
|
99
|
+
*
|
|
100
|
+
* The first is what the Modules table refuses a second provider by; the second is what it warns about
|
|
101
|
+
* when a provider is switched on over a stored structure of another shell, and what "Clear Area" and a
|
|
102
|
+
* refused structure save name.
|
|
103
|
+
*/
|
|
104
|
+
export declare function buildPhiBuilderAreaShellsByArea(runtime: PhiBlockRuntime, runtimeModuleCatalog: PhiRuntimeModuleCatalog): Promise<Partial<Record<PhiDeveloperBuilderArea, PhiWorkspaceAreaShellState>>>;
|
|
89
105
|
export {};
|