@phis/ui 0.5.6 → 0.6.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/controls/phi-amount-list-control.d.ts +69 -0
- package/components/controls/phi-amount-list-control.js +15 -0
- package/components/controls/phi-background-control.d.ts +9 -1
- package/components/controls/phi-background-control.js +66 -20
- package/components/controls/phi-button-control.js +16 -2
- package/components/root/phi-root-layout.d.ts +1 -0
- package/components/root/phi-root-layout.js +1 -0
- package/components/widgets/config/background-pattern-live.d.ts +25 -0
- package/components/widgets/config/background-pattern-live.js +50 -0
- package/components/widgets/shared/markdown-body-client.d.ts +4 -1
- package/components/widgets/shared/markdown-body-client.js +3 -3
- package/components/widgets/shared/markdown-image-vocabulary.d.ts +19 -6
- package/components/widgets/shared/markdown-image-vocabulary.js +34 -9
- package/components/widgets/shared/markdown-render.d.ts +2 -1
- package/components/widgets/shared/markdown-render.js +4 -1
- package/constants/media.d.ts +2 -0
- package/constants/media.js +2 -0
- package/controls.d.ts +2 -0
- package/controls.js +1 -0
- package/gateway/signet-route.d.ts +24 -0
- package/gateway/signet-route.js +102 -0
- package/gateway/site-proxy.js +14 -7
- package/helpers/phi-metadata.d.ts +8 -6
- package/helpers/phi-metadata.js +9 -2
- package/helpers/phi-signet-head.d.ts +25 -0
- package/helpers/phi-signet-head.js +41 -0
- package/helpers/phi-signet-paths.d.ts +16 -0
- package/helpers/phi-signet-paths.js +19 -0
- package/helpers/phi-signet.d.ts +28 -0
- package/helpers/phi-signet.js +59 -0
- package/next/root-route.js +7 -4
- package/next/site-proxy.js +16 -0
- package/package.json +3 -3
- package/plugins/runtime-modules/area-definitions.d.ts +24 -3
- package/plugins/runtime-modules/area-definitions.js +11 -3
- package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +1 -1
- package/plugins/runtime-modules/builder/clients/inspector-config-field.js +8 -0
- package/plugins/runtime-modules/core/widgets/card/config.d.ts +10 -0
- package/plugins/runtime-modules/core/widgets/card/config.js +1 -0
- package/plugins/runtime-modules/core/widgets/description/config.d.ts +10 -0
- package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +10 -0
- package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +10 -0
- package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +16 -1
- package/plugins/runtime-modules/core/widgets/markdown/config.js +18 -1
- package/plugins/runtime-modules/core/widgets/result/config.d.ts +10 -0
- package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +10 -0
- package/plugins/runtime-modules/core/widgets/table/config.d.ts +34 -0
- package/plugins/runtime-modules/public/presets.d.ts +12 -0
- package/plugins/runtime-modules/public/presets.js +10 -0
- package/plugins/runtime-modules/public/server.js +1 -1
- package/plugins/runtime-modules/public/trees/phi-default-pub-privacy-page-tree.d.ts +4 -0
- package/plugins/runtime-modules/public/trees/phi-default-pub-privacy-page-tree.js +66 -0
- package/plugins/runtime-modules/public-base-page-references.d.ts +2 -1
- package/plugins/runtime-modules/public-base-page-references.js +2 -1
- package/plugins/runtime-modules/theme/controller/runtime.js +7 -2
- package/plugins/runtime-modules/theme/materialize-images.d.ts +16 -0
- package/plugins/runtime-modules/theme/materialize-images.js +37 -0
- package/styles/amount-list.css +142 -0
- package/styles/controls.css +186 -12
- package/styles/gradients.css +21 -20
- package/theme/phi-theme-blocks.d.ts +7 -6
- package/theme/phi-theme-composition.d.ts +19 -1
- package/theme/phi-theme-composition.js +15 -0
- package/theme/phi-theme-signet.d.ts +25 -0
- package/theme/phi-theme-signet.js +17 -0
- package/types/cms-plugins.d.ts +8 -0
- package/types/core-widget-placements.d.ts +2 -1
- package/types/site-theme.d.ts +17 -0
|
@@ -3,7 +3,7 @@ import type { PhiCmsResolvedContent } from "../../../types/cms";
|
|
|
3
3
|
import type { PhiMarkdownTocHeading } from "../../../types/markdown";
|
|
4
4
|
import type { PhiMarkdownBlock } from "./markdown-body-client";
|
|
5
5
|
import type { PhiMarkdownImageFloat } from "../../../types/core-widget-placements";
|
|
6
|
-
import { type PhiMarkdownImageAspectRatio } from "./markdown-image-vocabulary";
|
|
6
|
+
import { type PhiMarkdownImageAspectRatio, type PhiMarkdownImageFloatWidth } from "./markdown-image-vocabulary";
|
|
7
7
|
/**
|
|
8
8
|
* Where Markdown comes from and how it is turned into blocks: inline text, a stored content field, or a
|
|
9
9
|
* document fetched by URL, translated or not, with heading ids under a prefix of its own.
|
|
@@ -37,6 +37,7 @@ export type PhiMarkdownSourceConfig = {
|
|
|
37
37
|
/** What every picture in the text does, unless its own address says otherwise (`markdown-image-vocabulary.ts`). */
|
|
38
38
|
imageAspectRatio?: PhiMarkdownImageAspectRatio;
|
|
39
39
|
imageFloat?: PhiMarkdownImageFloat;
|
|
40
|
+
imageFloatWidth?: PhiMarkdownImageFloatWidth;
|
|
40
41
|
};
|
|
41
42
|
export type MarkdownRenderData = {
|
|
42
43
|
blocks: PhiMarkdownBlock[];
|
|
@@ -5,7 +5,7 @@ import remarkGfm from "remark-gfm";
|
|
|
5
5
|
import { trBulk, trBulkForLocale } from "../../../server-helpers/translate";
|
|
6
6
|
import { resolvePhiImagePresentation } from "../../media/image-presentation";
|
|
7
7
|
import { isPhiMediaSvgContentType } from "../../../constants/media";
|
|
8
|
-
import { readPhiMarkdownImageAddress, resolvePhiMarkdownImageAspectRatioCss, resolvePhiMarkdownImageAspectRatioValue, } from "./markdown-image-vocabulary";
|
|
8
|
+
import { readPhiMarkdownImageAddress, resolvePhiMarkdownImageAspectRatioCss, resolvePhiMarkdownImageAspectRatioValue, PHI_MARKDOWN_IMAGE_FLOAT_WIDTH_DEFAULT, } from "./markdown-image-vocabulary";
|
|
9
9
|
import { resolvePhiCodeLanguage, tokenizePhiCode } from "./markdown-code-tokens";
|
|
10
10
|
import { readPhiInternalReference } from "../../../types/references";
|
|
11
11
|
import { resolvePhiWidgetInternalReferences } from "../helpers/internal-reference-resolver.server";
|
|
@@ -155,6 +155,7 @@ async function projectInternalMarkdownNodes(tree, runtime) {
|
|
|
155
155
|
asset,
|
|
156
156
|
...(address.aspectRatio ? { aspectRatio: address.aspectRatio } : {}),
|
|
157
157
|
...(address.float ? { float: address.float } : {}),
|
|
158
|
+
...(address.floatWidth ? { floatWidth: address.floatWidth } : {}),
|
|
158
159
|
});
|
|
159
160
|
return [{ ...node, url: src, children }];
|
|
160
161
|
}
|
|
@@ -215,6 +216,7 @@ function buildMarkdownFigure(image, source, defaults) {
|
|
|
215
216
|
optimizable: !isPhiMediaSvgContentType(asset.contentType),
|
|
216
217
|
aspectRatio: resolvePhiMarkdownImageAspectRatioCss(aspectRatio),
|
|
217
218
|
float: source.float ?? defaults.float ?? "none",
|
|
219
|
+
floatWidth: source.floatWidth ?? defaults.floatWidth ?? PHI_MARKDOWN_IMAGE_FLOAT_WIDTH_DEFAULT,
|
|
218
220
|
};
|
|
219
221
|
}
|
|
220
222
|
function mapInlineNodes(nodes) {
|
|
@@ -488,6 +490,7 @@ export async function resolveMarkdownRenderData(config, runtime) {
|
|
|
488
490
|
: null, runtime, config?.extent ?? "document", config?.headingOffset ?? 0, {
|
|
489
491
|
...(config?.imageAspectRatio ? { aspectRatio: config.imageAspectRatio } : {}),
|
|
490
492
|
...(config?.imageFloat ? { float: config.imageFloat } : {}),
|
|
493
|
+
...(config?.imageFloatWidth ? { floatWidth: config.imageFloatWidth } : {}),
|
|
491
494
|
});
|
|
492
495
|
}
|
|
493
496
|
async function resolveMarkdownRenderDataFromSource(markdown, translate, headingIdPrefix, sourceLocale, sourceMode = "inline", sourceUrl = null, runtime, extent = "document", headingOffset = 0, imageDefaults = {}) {
|
package/constants/media.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export declare const PhiMediaAssetSource: {
|
|
|
21
21
|
readonly ThemeGround: "theme-ground";
|
|
22
22
|
/** A Logo a Theme Set offered, taken over when the Theme was saved. */
|
|
23
23
|
readonly ThemeBrandLogo: "theme-brand-logo";
|
|
24
|
+
/** A Signet a Theme Set offered, taken over when the Theme was saved. */
|
|
25
|
+
readonly ThemeBrandSignet: "theme-brand-signet";
|
|
24
26
|
/** Fetched from the Iconify catalogue by the Mask picker. */
|
|
25
27
|
readonly Iconify: "iconify";
|
|
26
28
|
};
|
package/constants/media.js
CHANGED
|
@@ -24,6 +24,8 @@ export const PhiMediaAssetSource = {
|
|
|
24
24
|
ThemeGround: "theme-ground",
|
|
25
25
|
/** A Logo a Theme Set offered, taken over when the Theme was saved. */
|
|
26
26
|
ThemeBrandLogo: "theme-brand-logo",
|
|
27
|
+
/** A Signet a Theme Set offered, taken over when the Theme was saved. */
|
|
28
|
+
ThemeBrandSignet: "theme-brand-signet",
|
|
27
29
|
/** Fetched from the Iconify catalogue by the Mask picker. */
|
|
28
30
|
Iconify: "iconify",
|
|
29
31
|
};
|
package/controls.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export type { PhiCompactGroupControlProps } from "./components/controls/phi-comp
|
|
|
9
9
|
export { PhiViewportVisibilityControl } from "./components/controls/phi-viewport-visibility-control";
|
|
10
10
|
export { PhiEntryListControl } from "./components/controls/phi-entry-list-control";
|
|
11
11
|
export type { PhiEntryListControlProps, PhiEntryListEntry } from "./components/controls/phi-entry-list-control";
|
|
12
|
+
export { PhiAmountListControl } from "./components/controls/phi-amount-list-control";
|
|
13
|
+
export type { PhiAmountListControlProps, PhiAmountListItem, PhiAmountListTotal, } from "./components/controls/phi-amount-list-control";
|
|
12
14
|
export { PhiPlacementMatrixControl } from "./components/controls/phi-placement-matrix-control";
|
|
13
15
|
export type { PhiPlacementMatrixControlProps } from "./components/controls/phi-placement-matrix-control";
|
|
14
16
|
export { PhiNumberControl } from "./components/controls/phi-number-control";
|
package/controls.js
CHANGED
|
@@ -4,6 +4,7 @@ export { PHI_CONTROL_SIZES, PHI_FEEDBACK_LEVELS, readPhiControlSize, } from "./t
|
|
|
4
4
|
export { PhiCompactGroupControl } from "./components/controls/phi-compact-group-control";
|
|
5
5
|
export { PhiViewportVisibilityControl } from "./components/controls/phi-viewport-visibility-control";
|
|
6
6
|
export { PhiEntryListControl } from "./components/controls/phi-entry-list-control";
|
|
7
|
+
export { PhiAmountListControl } from "./components/controls/phi-amount-list-control";
|
|
7
8
|
export { PhiPlacementMatrixControl } from "./components/controls/phi-placement-matrix-control";
|
|
8
9
|
export { PhiNumberControl } from "./components/controls/phi-number-control";
|
|
9
10
|
export { PhiPopoverControl } from "./components/controls/phi-popover-control";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { NextRequest } from "next/server";
|
|
3
|
+
import type { PhiNextProxyHandler } from "../net/phi-next-proxy";
|
|
4
|
+
import type { PhiSiteAreaBridgeLoader } from "./site-area-bridges";
|
|
5
|
+
/**
|
|
6
|
+
* `GET /api/site/signet`: the Signet the Site owns, as a picture at a real address.
|
|
7
|
+
*
|
|
8
|
+
* Only the Site's own, `theme.brand.signet` of the published record, which a Theme save writes
|
|
9
|
+
* (`materializePhiThemeBrandSignet`). A Theme Set's Signet is not resolved here: that needs the Theme
|
|
10
|
+
* blocks of the installed Modules, a graph this door does not carry, and the head names a followed Set's
|
|
11
|
+
* Signet as the data URL it is instead. An Asset is read through the media door; an inline `data:image/`
|
|
12
|
+
* picture is decoded. An address on another server is answered 404 and not redirected: a redirect from
|
|
13
|
+
* the favicon path would send every visitor's request to a third party, the head cannot name it, and
|
|
14
|
+
* nothing writes one -- the save uploads what it finds.
|
|
15
|
+
*
|
|
16
|
+
* Three ways in, one picture. The head names `?v=<identifier>`; the proxy rewrites the browser's own
|
|
17
|
+
* `/favicon.ico`, `/apple-touch-icon.png` and `/apple-touch-icon-precomposed.png` to `?as=favicon|apple`.
|
|
18
|
+
* An Apple path answers only for a PNG of 180 px or more -- anything else would be scaled into a blur.
|
|
19
|
+
* No Site Signet, or one that cannot be delivered, answers 404.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildPhiSignetRouteHandler({ loadAreaBridge, proxied, }: {
|
|
22
|
+
loadAreaBridge: PhiSiteAreaBridgeLoader;
|
|
23
|
+
proxied: PhiNextProxyHandler;
|
|
24
|
+
}): (request: NextRequest) => Promise<Response>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { NextRequest } from "next/server";
|
|
3
|
+
import { readPhiThemeSiteSignet } from "../theme/phi-theme-signet";
|
|
4
|
+
import { PHI_SIGNET_ALIAS_PARAM, PHI_SIGNET_APPLE_MIN_SIZE, PHI_SIGNET_VERSION_PARAM } from "../helpers/phi-signet-paths";
|
|
5
|
+
import { buildPhiSignetVersion, decodePhiSignetDataUrl, readPhiPngSize, } from "../helpers/phi-signet";
|
|
6
|
+
import { getResolvedSiteConfig } from "./site-config";
|
|
7
|
+
/** An address that names the picture's own content never changes what it answers: a year, immutable. */
|
|
8
|
+
const PHI_SIGNET_CACHE_IDENTIFIED = "public, max-age=31536000, immutable";
|
|
9
|
+
/**
|
|
10
|
+
* Everything else: the browser's own `/favicon.ico` and Apple paths, an address whose identifier is not
|
|
11
|
+
* the current one, and a library picture, whose identifier cannot see the bytes. Short, so a changed
|
|
12
|
+
* Signet reaches the tab within the hour.
|
|
13
|
+
*/
|
|
14
|
+
const PHI_SIGNET_CACHE_SHORT = "public, max-age=3600";
|
|
15
|
+
const PHI_SIGNET_CACHE_MISSING = "public, max-age=300";
|
|
16
|
+
/**
|
|
17
|
+
* The picture is only ever shown by an `<img>` or the tab, but its address can be opened as a document,
|
|
18
|
+
* and an SVG is a document. The sandbox and the empty policy keep a script in one from running on the
|
|
19
|
+
* Site's origin.
|
|
20
|
+
*/
|
|
21
|
+
const PHI_SIGNET_SECURITY_HEADERS = {
|
|
22
|
+
"content-security-policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
|
|
23
|
+
"x-content-type-options": "nosniff",
|
|
24
|
+
};
|
|
25
|
+
function missing() {
|
|
26
|
+
return new Response(null, { status: 404, headers: { "cache-control": PHI_SIGNET_CACHE_MISSING } });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A library picture, read through the same door every Asset is delivered by.
|
|
30
|
+
*
|
|
31
|
+
* Not redirected: the Apple path has to know whether the bytes are a PNG of 180 px, and the tab should
|
|
32
|
+
* not depend on a second request that follows a first. Anything that is not an image answers null.
|
|
33
|
+
*/
|
|
34
|
+
async function readPhiSignetAsset(assetId, request, proxied) {
|
|
35
|
+
const upstream = await proxied(new NextRequest(new URL(`/api/site/media/${assetId}/content`, request.url), { headers: request.headers }), { params: Promise.resolve({ path: ["media", String(assetId), "content"] }) });
|
|
36
|
+
const contentType = upstream.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase() ?? "";
|
|
37
|
+
if (!upstream.ok || !contentType.startsWith("image/"))
|
|
38
|
+
return null;
|
|
39
|
+
return { contentType, bytes: new Uint8Array(await upstream.arrayBuffer()) };
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* `GET /api/site/signet`: the Signet the Site owns, as a picture at a real address.
|
|
43
|
+
*
|
|
44
|
+
* Only the Site's own, `theme.brand.signet` of the published record, which a Theme save writes
|
|
45
|
+
* (`materializePhiThemeBrandSignet`). A Theme Set's Signet is not resolved here: that needs the Theme
|
|
46
|
+
* blocks of the installed Modules, a graph this door does not carry, and the head names a followed Set's
|
|
47
|
+
* Signet as the data URL it is instead. An Asset is read through the media door; an inline `data:image/`
|
|
48
|
+
* picture is decoded. An address on another server is answered 404 and not redirected: a redirect from
|
|
49
|
+
* the favicon path would send every visitor's request to a third party, the head cannot name it, and
|
|
50
|
+
* nothing writes one -- the save uploads what it finds.
|
|
51
|
+
*
|
|
52
|
+
* Three ways in, one picture. The head names `?v=<identifier>`; the proxy rewrites the browser's own
|
|
53
|
+
* `/favicon.ico`, `/apple-touch-icon.png` and `/apple-touch-icon-precomposed.png` to `?as=favicon|apple`.
|
|
54
|
+
* An Apple path answers only for a PNG of 180 px or more -- anything else would be scaled into a blur.
|
|
55
|
+
* No Site Signet, or one that cannot be delivered, answers 404.
|
|
56
|
+
*/
|
|
57
|
+
export function buildPhiSignetRouteHandler({ loadAreaBridge, proxied, }) {
|
|
58
|
+
return async function GET(request) {
|
|
59
|
+
// Any Bridge knows the Site's key and its Core; the Public one is the one every Site has.
|
|
60
|
+
const runtime = (await loadAreaBridge("public"))?.runtime;
|
|
61
|
+
if (!runtime)
|
|
62
|
+
return missing();
|
|
63
|
+
const site = await getResolvedSiteConfig({
|
|
64
|
+
apiBaseUrl: runtime.apiBaseUrl,
|
|
65
|
+
internalToken: runtime.internalToken,
|
|
66
|
+
siteKey: runtime.siteKey,
|
|
67
|
+
});
|
|
68
|
+
const signet = readPhiThemeSiteSignet(site.theme?.brand?.signet);
|
|
69
|
+
if (!signet)
|
|
70
|
+
return missing();
|
|
71
|
+
let image;
|
|
72
|
+
let identity;
|
|
73
|
+
if (signet.kind === "data") {
|
|
74
|
+
image = decodePhiSignetDataUrl(signet.source);
|
|
75
|
+
identity = image?.bytes ?? "";
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
image = await readPhiSignetAsset(signet.assetId, request, proxied);
|
|
79
|
+
identity = `asset:${signet.assetId}`;
|
|
80
|
+
}
|
|
81
|
+
if (!image)
|
|
82
|
+
return missing();
|
|
83
|
+
const alias = request.nextUrl.searchParams.get(PHI_SIGNET_ALIAS_PARAM);
|
|
84
|
+
if (alias === "apple") {
|
|
85
|
+
const dimensions = image.contentType === "image/png" ? readPhiPngSize(image.bytes) : null;
|
|
86
|
+
if (!dimensions || dimensions.width < PHI_SIGNET_APPLE_MIN_SIZE || dimensions.height < PHI_SIGNET_APPLE_MIN_SIZE) {
|
|
87
|
+
return missing();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const asked = request.nextUrl.searchParams.get(PHI_SIGNET_VERSION_PARAM);
|
|
91
|
+
const identified = alias === null && asked === buildPhiSignetVersion(identity);
|
|
92
|
+
return new Response(Buffer.from(image.bytes), {
|
|
93
|
+
status: 200,
|
|
94
|
+
headers: {
|
|
95
|
+
"content-type": image.contentType,
|
|
96
|
+
"content-length": String(image.bytes.length),
|
|
97
|
+
"cache-control": identified && signet.kind === "data" ? PHI_SIGNET_CACHE_IDENTIFIED : PHI_SIGNET_CACHE_SHORT,
|
|
98
|
+
...PHI_SIGNET_SECURITY_HEADERS,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
}
|
package/gateway/site-proxy.js
CHANGED
|
@@ -7,8 +7,10 @@ import { clearPhiSiteReadCache } from "./site-read-cache";
|
|
|
7
7
|
* `module-diagnostics` compares what this Site's Modules require against what its server offers;
|
|
8
8
|
* `navigation-target` resolves where a forwarding Area root would send this viewer; and
|
|
9
9
|
* `dashboard-cards` fans the Area's active Modules in to one list of cards, then answers each card's
|
|
10
|
-
* payload;
|
|
11
|
-
*
|
|
10
|
+
* payload; `page-references` lists the Pages of an Area a link may point at; and `signet` delivers the
|
|
11
|
+
* Theme's Signet as a picture, the address the document head and `/favicon.ico` lead to
|
|
12
|
+
* (`gateway/signet-route.ts`). All six read the Site's own Module catalogs, which phi-server
|
|
13
|
+
* deliberately knows nothing about.
|
|
12
14
|
*
|
|
13
15
|
* They are one segment each and matched exactly, so nothing deeper is captured by accident: an Asset
|
|
14
16
|
* under `/api/site/media/...` goes upstream as it always did. It is also why `dashboard-cards` names
|
|
@@ -20,6 +22,7 @@ const LOCALLY_ANSWERED = [
|
|
|
20
22
|
"navigation-target",
|
|
21
23
|
"dashboard-cards",
|
|
22
24
|
"page-references",
|
|
25
|
+
"signet",
|
|
23
26
|
];
|
|
24
27
|
function locallyAnswered(path) {
|
|
25
28
|
const first = path?.length === 1 ? path[0] : null;
|
|
@@ -32,7 +35,7 @@ function locallyAnswered(path) {
|
|
|
32
35
|
* package. Importing that at module scope would put it in the graph of a route that for nearly every
|
|
33
36
|
* request only copies bytes to Core and back.
|
|
34
37
|
*/
|
|
35
|
-
async function buildLocallyAnsweredHandlers(answered, { upstreamBaseUrl, timeoutMs, buildHeaders, loadAreaBridge }) {
|
|
38
|
+
async function buildLocallyAnsweredHandlers(answered, { upstreamBaseUrl, timeoutMs, buildHeaders, loadAreaBridge }, proxied) {
|
|
36
39
|
if (answered === "forms") {
|
|
37
40
|
const { buildPhiSiteFormRouteHandlers } = await import("./site-form-route");
|
|
38
41
|
const handlers = buildPhiSiteFormRouteHandlers({
|
|
@@ -56,6 +59,10 @@ async function buildLocallyAnsweredHandlers(answered, { upstreamBaseUrl, timeout
|
|
|
56
59
|
const { buildPhiPageReferencesRouteHandler } = await import("./page-references-route");
|
|
57
60
|
return { GET: buildPhiPageReferencesRouteHandler({ loadAreaBridge }) };
|
|
58
61
|
}
|
|
62
|
+
if (answered === "signet") {
|
|
63
|
+
const { buildPhiSignetRouteHandler } = await import("./signet-route");
|
|
64
|
+
return { GET: buildPhiSignetRouteHandler({ loadAreaBridge, proxied }) };
|
|
65
|
+
}
|
|
59
66
|
const { buildPhiNavigationTargetRouteHandler } = await import("./navigation-target-route");
|
|
60
67
|
return { GET: buildPhiNavigationTargetRouteHandler({ loadAreaBridge }) };
|
|
61
68
|
}
|
|
@@ -133,13 +140,13 @@ export function buildPhiSiteProxyHandlers(options) {
|
|
|
133
140
|
}
|
|
134
141
|
let pending = built.get(answered);
|
|
135
142
|
if (!pending) {
|
|
136
|
-
pending = buildLocallyAnsweredHandlers(answered, options);
|
|
143
|
+
pending = buildLocallyAnsweredHandlers(answered, options, handlers.GET);
|
|
137
144
|
built.set(answered, pending);
|
|
138
145
|
}
|
|
139
|
-
const
|
|
140
|
-
const local =
|
|
146
|
+
const answeredHandlers = await pending;
|
|
147
|
+
const local = answeredHandlers[method] ?? (method === "HEAD" ? answeredHandlers.GET : undefined);
|
|
141
148
|
if (!local) {
|
|
142
|
-
const allow = Object.keys(
|
|
149
|
+
const allow = Object.keys(answeredHandlers).join(", ");
|
|
143
150
|
return new Response(null, { status: 405, headers: { allow } });
|
|
144
151
|
}
|
|
145
152
|
return local(request, context);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import type { PhiCmsAreaKey } from "../constants/cms-areas";
|
|
3
3
|
import { type PhiAreaMeta } from "./cms-area-config";
|
|
4
|
+
import type { PhiSignetHead } from "./phi-signet-head";
|
|
4
5
|
import { type PhiPublicPageAddress } from "./phi-seo";
|
|
5
6
|
export type PhiMetadataScope = {
|
|
6
7
|
title?: string | null;
|
|
@@ -17,14 +18,15 @@ export type PhiRootMetadataInput = {
|
|
|
17
18
|
area?: PhiMetadataScope | null;
|
|
18
19
|
page?: PhiMetadataScope | null;
|
|
19
20
|
/**
|
|
20
|
-
* The Signet
|
|
21
|
-
* draw their own mark.
|
|
21
|
+
* The Signet as the head names it (`describePhiSignetHead`).
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* The Site's own is the address it delivers it at, with its media type and size where they are known;
|
|
24
|
+
* `apple` is present only where the picture is a PNG of at least 180 px, because an Apple touch icon
|
|
25
|
+
* has to be a raster of a stated size. A followed Set's Signet is its data URL and nothing else:
|
|
26
|
+
* Chrome and Firefox show it, Safari does not, and a Theme save is what gives the Site a real address.
|
|
27
|
+
* A Site that has no Signet says nothing at all here, and `/favicon.ico` answers 404 for it.
|
|
26
28
|
*/
|
|
27
|
-
signet?:
|
|
29
|
+
signet?: PhiSignetHead | null;
|
|
28
30
|
};
|
|
29
31
|
export declare function buildPhiRootMetadata(options?: PhiRootMetadataInput): Metadata;
|
|
30
32
|
/**
|
package/helpers/phi-metadata.js
CHANGED
|
@@ -36,7 +36,7 @@ export function buildPhiRootMetadata(options = {}) {
|
|
|
36
36
|
const resolvedDescription = resolveFirstText(options.page?.description, options.area?.description, options.site?.description, options.defaultDescription);
|
|
37
37
|
const resolvedApplicationName = resolveFirstText(options.applicationName, resolvedSiteTitle, resolvedAreaTitle);
|
|
38
38
|
const resolvedMetadataBase = resolveMetadataBase(options.metadataBase);
|
|
39
|
-
const
|
|
39
|
+
const signet = options.signet?.href?.trim() ? options.signet : null;
|
|
40
40
|
const shouldNoIndex = options.page?.noindex === true ||
|
|
41
41
|
options.area?.noindex === true ||
|
|
42
42
|
options.site?.noindex === true;
|
|
@@ -44,7 +44,14 @@ export function buildPhiRootMetadata(options = {}) {
|
|
|
44
44
|
...(resolvedMetadataBase ? { metadataBase: resolvedMetadataBase } : {}),
|
|
45
45
|
...(resolvedApplicationName ? { applicationName: resolvedApplicationName } : {}),
|
|
46
46
|
...(resolvedDescription ? { description: resolvedDescription } : {}),
|
|
47
|
-
...(
|
|
47
|
+
...(signet
|
|
48
|
+
? {
|
|
49
|
+
icons: {
|
|
50
|
+
icon: { url: signet.href, ...(signet.type ? { type: signet.type } : {}), ...(signet.sizes ? { sizes: signet.sizes } : {}) },
|
|
51
|
+
...(signet.apple ? { apple: { url: signet.apple.href, type: signet.apple.type, sizes: signet.apple.sizes } } : {}),
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
: {}),
|
|
48
55
|
...(shouldNoIndex
|
|
49
56
|
? {
|
|
50
57
|
robots: {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PhiThemeSignet } from "../theme/phi-theme-signet";
|
|
2
|
+
/** What the document head needs to say about the Signet; `appleHref` only where a raster of 180 px or more is known. */
|
|
3
|
+
export type PhiSignetHead = {
|
|
4
|
+
href: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
sizes?: string;
|
|
7
|
+
apple?: {
|
|
8
|
+
href: string;
|
|
9
|
+
type: string;
|
|
10
|
+
sizes: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The head entries for a Signet, or null where it cannot be delivered and the head says nothing.
|
|
15
|
+
*
|
|
16
|
+
* Only the Site's own Signet has an address of its own. A Set's -- the Site follows, nothing saved --
|
|
17
|
+
* is named as the data URL it is: Chrome and Firefox show it, Safari does not, and the save that takes it
|
|
18
|
+
* into the Media library is what gives that Site an icon there.
|
|
19
|
+
*
|
|
20
|
+
* A data URL that does not decode is not named: pointing the tab at an address that answers 404 would
|
|
21
|
+
* be worse than leaving the browser its own `/favicon.ico` request. An Asset is named without a type or
|
|
22
|
+
* a size, because the picture is not at hand here -- the response carries its type, and the Apple path
|
|
23
|
+
* answers for itself from the bytes.
|
|
24
|
+
*/
|
|
25
|
+
export declare function describePhiSignetHead(signet: PhiThemeSignet | null | undefined): PhiSignetHead | null;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PHI_SIGNET_APPLE_MIN_SIZE, PHI_SIGNET_PATH, PHI_SIGNET_VERSION_PARAM } from "./phi-signet-paths";
|
|
2
|
+
import { buildPhiSignetVersion, decodePhiSignetDataUrl, readPhiPngSize } from "./phi-signet";
|
|
3
|
+
function buildPhiSignetHref(version) {
|
|
4
|
+
return `${PHI_SIGNET_PATH}?${PHI_SIGNET_VERSION_PARAM}=${version}`;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The head entries for a Signet, or null where it cannot be delivered and the head says nothing.
|
|
8
|
+
*
|
|
9
|
+
* Only the Site's own Signet has an address of its own. A Set's -- the Site follows, nothing saved --
|
|
10
|
+
* is named as the data URL it is: Chrome and Firefox show it, Safari does not, and the save that takes it
|
|
11
|
+
* into the Media library is what gives that Site an icon there.
|
|
12
|
+
*
|
|
13
|
+
* A data URL that does not decode is not named: pointing the tab at an address that answers 404 would
|
|
14
|
+
* be worse than leaving the browser its own `/favicon.ico` request. An Asset is named without a type or
|
|
15
|
+
* a size, because the picture is not at hand here -- the response carries its type, and the Apple path
|
|
16
|
+
* answers for itself from the bytes.
|
|
17
|
+
*/
|
|
18
|
+
export function describePhiSignetHead(signet) {
|
|
19
|
+
if (!signet)
|
|
20
|
+
return null;
|
|
21
|
+
if (signet.from === "set")
|
|
22
|
+
return signet.kind === "data" ? { href: signet.source } : null;
|
|
23
|
+
if (signet.kind === "asset") {
|
|
24
|
+
return { href: buildPhiSignetHref(buildPhiSignetVersion(`asset:${signet.assetId}`)) };
|
|
25
|
+
}
|
|
26
|
+
const image = decodePhiSignetDataUrl(signet.source);
|
|
27
|
+
if (!image)
|
|
28
|
+
return null;
|
|
29
|
+
const href = buildPhiSignetHref(buildPhiSignetVersion(image.bytes));
|
|
30
|
+
const dimensions = image.contentType === "image/png" ? readPhiPngSize(image.bytes) : null;
|
|
31
|
+
const sizes = dimensions ? `${dimensions.width}x${dimensions.height}` : undefined;
|
|
32
|
+
const apple = dimensions && dimensions.width >= PHI_SIGNET_APPLE_MIN_SIZE && dimensions.height >= PHI_SIGNET_APPLE_MIN_SIZE
|
|
33
|
+
? { href, type: image.contentType, sizes: sizes }
|
|
34
|
+
: undefined;
|
|
35
|
+
return {
|
|
36
|
+
href,
|
|
37
|
+
type: image.contentType,
|
|
38
|
+
...(sizes ? { sizes } : {}),
|
|
39
|
+
...(apple ? { apple } : {}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a Site's Signet is delivered, and how the browser's own guesses reach it.
|
|
3
|
+
*
|
|
4
|
+
* One address under `/api/site`, the door every Site already mounts, so no Site file names it. The
|
|
5
|
+
* proxy rewrites `/favicon.ico` and the two Apple touch icon paths to it (`next/site-proxy.ts`), which
|
|
6
|
+
* is how a browser that never read the document head -- Safari asks for these on its own -- still gets
|
|
7
|
+
* the mark. `as` says which of those it was.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PHI_SIGNET_PATH = "/api/site/signet";
|
|
10
|
+
export declare const PHI_SIGNET_VERSION_PARAM = "v";
|
|
11
|
+
export declare const PHI_SIGNET_ALIAS_PARAM = "as";
|
|
12
|
+
export type PhiSignetAlias = "favicon" | "apple";
|
|
13
|
+
/** The paths a browser asks for unprompted, and which answer each one stands for. */
|
|
14
|
+
export declare const PHI_SIGNET_ALIAS_PATHS: Readonly<Record<string, PhiSignetAlias>>;
|
|
15
|
+
/** The smallest square an Apple touch icon may be; a smaller one is scaled up and looks it. */
|
|
16
|
+
export declare const PHI_SIGNET_APPLE_MIN_SIZE = 180;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a Site's Signet is delivered, and how the browser's own guesses reach it.
|
|
3
|
+
*
|
|
4
|
+
* One address under `/api/site`, the door every Site already mounts, so no Site file names it. The
|
|
5
|
+
* proxy rewrites `/favicon.ico` and the two Apple touch icon paths to it (`next/site-proxy.ts`), which
|
|
6
|
+
* is how a browser that never read the document head -- Safari asks for these on its own -- still gets
|
|
7
|
+
* the mark. `as` says which of those it was.
|
|
8
|
+
*/
|
|
9
|
+
export const PHI_SIGNET_PATH = "/api/site/signet";
|
|
10
|
+
export const PHI_SIGNET_VERSION_PARAM = "v";
|
|
11
|
+
export const PHI_SIGNET_ALIAS_PARAM = "as";
|
|
12
|
+
/** The paths a browser asks for unprompted, and which answer each one stands for. */
|
|
13
|
+
export const PHI_SIGNET_ALIAS_PATHS = {
|
|
14
|
+
"/favicon.ico": "favicon",
|
|
15
|
+
"/apple-touch-icon.png": "apple",
|
|
16
|
+
"/apple-touch-icon-precomposed.png": "apple",
|
|
17
|
+
};
|
|
18
|
+
/** The smallest square an Apple touch icon may be; a smaller one is scaled up and looks it. */
|
|
19
|
+
export const PHI_SIGNET_APPLE_MIN_SIZE = 180;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type PhiSignetImage = {
|
|
2
|
+
contentType: string;
|
|
3
|
+
bytes: Uint8Array;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* The picture a data URL carries, or null for anything the route does not deliver.
|
|
7
|
+
*
|
|
8
|
+
* Only PNG, SVG, ICO and WebP, and only as `;base64` -- or, for SVG alone, as text (`;utf8` or none),
|
|
9
|
+
* percent-decoded, which is how a drawing is written inline. A raster as text is not a thing, and any
|
|
10
|
+
* other media type is somebody's mistake or somebody's attempt; both answer null, which the route
|
|
11
|
+
* turns into a 404.
|
|
12
|
+
*/
|
|
13
|
+
export declare function decodePhiSignetDataUrl(source: string): PhiSignetImage | null;
|
|
14
|
+
/** The pixel size a PNG's header states, or null for bytes that are not a PNG with a header. */
|
|
15
|
+
export declare function readPhiPngSize(bytes: Uint8Array): {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
} | null;
|
|
19
|
+
/**
|
|
20
|
+
* A short identifier of what a Signet shows, for the address the head names.
|
|
21
|
+
*
|
|
22
|
+
* Of the picture's own bytes where the Signet is inline, so the same picture is the same address
|
|
23
|
+
* whichever Set or record carries it and a changed one is a new address -- which is what lets that
|
|
24
|
+
* address be cached for a year. Of the Asset's id where it is a library picture: the bytes are not
|
|
25
|
+
* known where the head is written, so a picture replaced in place under the same id keeps its address
|
|
26
|
+
* (and is therefore delivered with a short cache, see the route).
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildPhiSignetVersion(identity: Uint8Array | string): string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
const PHI_SIGNET_DATA_URL = /^data:(image\/(?:png|svg\+xml|x-icon|webp))((?:;(?:utf8|charset=[A-Za-z0-9-]+))*)(;base64)?,(.*)$/su;
|
|
3
|
+
const PHI_BASE64 = /^[A-Za-z0-9+/]+={0,2}$/u;
|
|
4
|
+
const PHI_PNG_SIGNATURE = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];
|
|
5
|
+
/**
|
|
6
|
+
* The picture a data URL carries, or null for anything the route does not deliver.
|
|
7
|
+
*
|
|
8
|
+
* Only PNG, SVG, ICO and WebP, and only as `;base64` -- or, for SVG alone, as text (`;utf8` or none),
|
|
9
|
+
* percent-decoded, which is how a drawing is written inline. A raster as text is not a thing, and any
|
|
10
|
+
* other media type is somebody's mistake or somebody's attempt; both answer null, which the route
|
|
11
|
+
* turns into a 404.
|
|
12
|
+
*/
|
|
13
|
+
export function decodePhiSignetDataUrl(source) {
|
|
14
|
+
const match = PHI_SIGNET_DATA_URL.exec(source.trim());
|
|
15
|
+
if (!match)
|
|
16
|
+
return null;
|
|
17
|
+
const [, contentType, , base64, payload] = match;
|
|
18
|
+
if (base64) {
|
|
19
|
+
const compact = payload.replace(/\s+/gu, "");
|
|
20
|
+
if (!compact || compact.length % 4 === 1 || !PHI_BASE64.test(compact))
|
|
21
|
+
return null;
|
|
22
|
+
const bytes = Buffer.from(compact, "base64");
|
|
23
|
+
return bytes.length > 0 ? { contentType, bytes: new Uint8Array(bytes) } : null;
|
|
24
|
+
}
|
|
25
|
+
if (contentType !== "image/svg+xml" || !payload)
|
|
26
|
+
return null;
|
|
27
|
+
try {
|
|
28
|
+
return { contentType, bytes: new TextEncoder().encode(decodeURIComponent(payload)) };
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/** The pixel size a PNG's header states, or null for bytes that are not a PNG with a header. */
|
|
35
|
+
export function readPhiPngSize(bytes) {
|
|
36
|
+
if (bytes.length < 24)
|
|
37
|
+
return null;
|
|
38
|
+
if (PHI_PNG_SIGNATURE.some((value, index) => bytes[index] !== value))
|
|
39
|
+
return null;
|
|
40
|
+
// The first chunk is always IHDR: length (4), the name (4), then width and height, big endian.
|
|
41
|
+
if (String.fromCharCode(bytes[12], bytes[13], bytes[14], bytes[15]) !== "IHDR")
|
|
42
|
+
return null;
|
|
43
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
44
|
+
const width = view.getUint32(16);
|
|
45
|
+
const height = view.getUint32(20);
|
|
46
|
+
return width > 0 && height > 0 ? { width, height } : null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A short identifier of what a Signet shows, for the address the head names.
|
|
50
|
+
*
|
|
51
|
+
* Of the picture's own bytes where the Signet is inline, so the same picture is the same address
|
|
52
|
+
* whichever Set or record carries it and a changed one is a new address -- which is what lets that
|
|
53
|
+
* address be cached for a year. Of the Asset's id where it is a library picture: the bytes are not
|
|
54
|
+
* known where the head is written, so a picture replaced in place under the same id keeps its address
|
|
55
|
+
* (and is therefore delivered with a short cache, see the route).
|
|
56
|
+
*/
|
|
57
|
+
export function buildPhiSignetVersion(identity) {
|
|
58
|
+
return createHash("sha256").update(identity).digest("hex").slice(0, 10);
|
|
59
|
+
}
|
package/next/root-route.js
CHANGED
|
@@ -10,6 +10,7 @@ import { resolvePhiThemeComposition } from "../theme/phi-theme-composition";
|
|
|
10
10
|
import { composePhiFontCatalogue } from "../theme/phi-font-catalogue";
|
|
11
11
|
import { PHI_REM_ROOT_PX } from "../theme/phi-css-vars";
|
|
12
12
|
import { buildPhiRootMetadata } from "../helpers/phi-metadata";
|
|
13
|
+
import { describePhiSignetHead } from "../helpers/phi-signet-head";
|
|
13
14
|
import { localizePath } from "../helpers/locale";
|
|
14
15
|
import { readPhiSiteRuntimeConfigSync, } from "../helpers/site-runtime";
|
|
15
16
|
import { loadPhiRootLayoutContext } from "../server-helpers/root-layout";
|
|
@@ -85,11 +86,13 @@ function buildPhiNextRootMetadata(runtimeConfig, site, themeBlocks) {
|
|
|
85
86
|
"Canonical starter structure for PHIS-powered sites.",
|
|
86
87
|
},
|
|
87
88
|
/*
|
|
88
|
-
* The
|
|
89
|
-
* and the header cannot end up wearing two different marks.
|
|
90
|
-
*
|
|
89
|
+
* The Signet the Site wears, resolved the way the Brand Widget resolves the Logo -- the Site's own,
|
|
90
|
+
* then the followed Set's -- so the tab and the header cannot end up wearing two different marks.
|
|
91
|
+
* The Site's own has an address and the head names it; a followed Set's is named as the data URL it
|
|
92
|
+
* is, which Safari does not show until a Theme save has made it the Site's own. A Site with no
|
|
93
|
+
* Signet hands over nothing and the head stays quiet.
|
|
91
94
|
*/
|
|
92
|
-
signet: resolvePhiThemeComposition(site.theme, themeBlocks).
|
|
95
|
+
signet: describePhiSignetHead(resolvePhiThemeComposition(site.theme, themeBlocks).signet),
|
|
93
96
|
});
|
|
94
97
|
}
|
|
95
98
|
/** The document shell of every dynamic route: the request decides the locale and the colour scheme. */
|
package/next/site-proxy.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NextRequest, NextResponse } from "next/server";
|
|
2
2
|
import { isPhiAssetOrBackendPath } from "./static-asset-path";
|
|
3
|
+
import { PHI_SIGNET_ALIAS_PARAM, PHI_SIGNET_ALIAS_PATHS, PHI_SIGNET_PATH } from "../helpers/phi-signet-paths";
|
|
3
4
|
import { PHI_SITE_SESSION_COOKIE } from "../constants/site-cookies";
|
|
4
5
|
import { PHI_CMS_SPECIAL_ROOTS } from "../helpers/cms-routing";
|
|
5
6
|
import { localizePath } from "../helpers/locale";
|
|
@@ -148,6 +149,21 @@ export async function proxyPhiNextSiteRequest(request) {
|
|
|
148
149
|
? NextResponse.next()
|
|
149
150
|
: new NextResponse(null, { status: 404 });
|
|
150
151
|
}
|
|
152
|
+
const signetAlias = request.method === "GET" || request.method === "HEAD"
|
|
153
|
+
? PHI_SIGNET_ALIAS_PATHS[pathname]
|
|
154
|
+
: undefined;
|
|
155
|
+
if (signetAlias) {
|
|
156
|
+
/*
|
|
157
|
+
* The paths a browser asks for without reading the document: Safari takes no icon from a data URL
|
|
158
|
+
* and asks for these instead. They are answered by the Site's Signet route, which has the picture
|
|
159
|
+
* and says 404 where there is none or it is not a PNG for the Apple paths. A rewrite, so the address
|
|
160
|
+
* the browser asked for stays what it asked for. This stands in front of a file of the Site's own
|
|
161
|
+
* at the same path, which is the cost of needing no file in the Site (THEME.md, Signet).
|
|
162
|
+
*/
|
|
163
|
+
const target = new URL(PHI_SIGNET_PATH, request.url);
|
|
164
|
+
target.searchParams.set(PHI_SIGNET_ALIAS_PARAM, signetAlias);
|
|
165
|
+
return NextResponse.rewrite(target);
|
|
166
|
+
}
|
|
151
167
|
if (isPhiAssetOrBackendPath(pathname)) {
|
|
152
168
|
/*
|
|
153
169
|
* `x-locale` is this proxy's word, set below from the path. A backend route resolves its locale
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phis/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -495,14 +495,14 @@
|
|
|
495
495
|
],
|
|
496
496
|
"peerDependencies": {
|
|
497
497
|
"@ant-design/icons": "^6.3.2",
|
|
498
|
-
"antd": "^6.7.
|
|
498
|
+
"antd": "^6.7.1",
|
|
499
499
|
"next": "^16.2.11",
|
|
500
500
|
"react": "^19.2.8",
|
|
501
501
|
"react-dom": "^19.2.8"
|
|
502
502
|
},
|
|
503
503
|
"dependencies": {
|
|
504
504
|
"@ant-design/colors": "^8.0.1",
|
|
505
|
-
"@ant-design/cssinjs": "
|
|
505
|
+
"@ant-design/cssinjs": "~2.1.2",
|
|
506
506
|
"@ant-design/icons-svg": "^4.6.0",
|
|
507
507
|
"@dnd-kit/core": "^6.3.1",
|
|
508
508
|
"@dnd-kit/sortable": "^10.0.0",
|