@aglyn/aglyn 1.26.5 → 1.27.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/package.json +11 -11
- package/src/lib/app-utils/business-details.d.ts +10 -0
- package/src/lib/app-utils/business-details.js +7 -0
- package/src/lib/app-utils/business-details.js.map +1 -1
- package/src/lib/app-utils/docs-help.generated.d.ts +2 -2
- package/src/lib/app-utils/docs-help.generated.js +2 -2
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +6 -6
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/native-nav.d.ts +29 -1
- package/src/lib/app-utils/native-nav.js +11 -2
- package/src/lib/app-utils/native-nav.js.map +1 -1
- package/src/lib/app-utils/native-store-billing.d.ts +26 -0
- package/src/lib/app-utils/native-store-billing.js +29 -0
- package/src/lib/app-utils/native-store-billing.js.map +1 -0
- package/src/lib/app-utils/screen-seo-fields.d.ts +9 -0
- package/src/lib/app-utils/screen-seo-fields.js +9 -2
- package/src/lib/app-utils/screen-seo-fields.js.map +1 -1
- package/src/lib/app-utils/screen-seo-update.d.ts +102 -0
- package/src/lib/app-utils/screen-seo-update.js +65 -0
- package/src/lib/app-utils/screen-seo-update.js.map +1 -0
- package/src/lib/app-utils/seo-listing-fields.d.ts +8 -0
- package/src/lib/app-utils/seo-listing-fields.js +6 -0
- package/src/lib/app-utils/seo-listing-fields.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.js +6 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ import { SCREEN_SEO_CARD_TEXT_FIELDS } from "./seo-listing-fields.js";
|
|
18
|
+
/**
|
|
19
|
+
* The text fields, which share their emptied-means-removed rule: the SEO
|
|
20
|
+
* card's plain inputs (the listing's title and description, and the
|
|
21
|
+
* breadcrumb label), from the one catalog both panels and every proposer read.
|
|
22
|
+
*/ const TEXT_FIELDS = SCREEN_SEO_CARD_TEXT_FIELDS;
|
|
23
|
+
/** The social image, its dimensions and its alt: written and removed together. */ const IMAGE_FIELDS = [
|
|
24
|
+
'image',
|
|
25
|
+
'imageWidth',
|
|
26
|
+
'imageHeight',
|
|
27
|
+
'imageAlt'
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Apply `edits` over the stored `seo` map.
|
|
31
|
+
*
|
|
32
|
+
* Returns the map to write, or `null` when nothing is left in it — the caller
|
|
33
|
+
* writes `deleteField()` there rather than storing an empty map, which reads
|
|
34
|
+
* back as an authored-but-blank SEO record.
|
|
35
|
+
*/ export function buildScreenSeoUpdate(existing, edits) {
|
|
36
|
+
const seo = _extends({}, existing != null ? existing : {});
|
|
37
|
+
for (const field of TEXT_FIELDS){
|
|
38
|
+
const staged = edits[field];
|
|
39
|
+
// Untouched. Whatever the document holds stays exactly as it is.
|
|
40
|
+
if (staged == null) continue;
|
|
41
|
+
const value = staged.trim();
|
|
42
|
+
if (value) seo[field] = value;
|
|
43
|
+
else delete seo[field];
|
|
44
|
+
}
|
|
45
|
+
if (edits.image != null) {
|
|
46
|
+
if (edits.image.image) {
|
|
47
|
+
var _edits_image_imageAlt;
|
|
48
|
+
seo.image = edits.image.image;
|
|
49
|
+
seo.imageWidth = edits.image.imageWidth;
|
|
50
|
+
seo.imageHeight = edits.image.imageHeight;
|
|
51
|
+
// Rule 1 again, for the newest member of the group: a blank alt is
|
|
52
|
+
// REMOVED rather than stored. `og:image:alt=""` asserts the image
|
|
53
|
+
// conveys nothing, which is not what an undescribed card means — and a
|
|
54
|
+
// stored `''` would make a screen look as though somebody had answered.
|
|
55
|
+
const staged = String((_edits_image_imageAlt = edits.image.imageAlt) != null ? _edits_image_imageAlt : '').trim();
|
|
56
|
+
if (staged) seo.imageAlt = staged;
|
|
57
|
+
else delete seo.imageAlt;
|
|
58
|
+
} else {
|
|
59
|
+
for (const field of IMAGE_FIELDS)delete seo[field];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return Object.keys(seo).length ? seo : null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=screen-seo-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/screen-seo-update.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n SCREEN_SEO_CARD_TEXT_FIELDS,\n type ScreenSeoCardTextField,\n} from './seo-listing-fields'\n\n/**\n * How a screen's `seo` map is rebuilt from a partial edit (AGL-1437).\n *\n * Here rather than in the console since AGL-4235: the public API saves a\n * page's search listing on the server, and it applies the same rules the two\n * console panels do, from this one function.\n *\n * ## Why this is one function and not two panels' worth of inline code\n *\n * Two surfaces edit the same map — the besigner's Screen Properties ▸ SEO\n * panel and the screen detail page's SEO card — and they DID drift. The\n * detail page carried untouched keys forward and dropped a cleared image;\n * the besigner defaulted the social-image triple to `''`/`0`/`0`, so saving a\n * description on a screen with no social image invented three keys the\n * document never had. `/careers` held exactly `{ description, title }`, and a\n * save through the besigner would have made it five.\n *\n * The rules below are the subtle part and belong in one place, exactly as\n * `ScreenSocialImageDraft`'s staging contract does — which is why that type\n * lives here now too, rather than in the field component that happens to\n * produce it.\n *\n * ## The rules\n *\n * 1. **Never invent a key.** An absent `image` and an `image: ''` beside\n * `0`×`0` are not the same document to any reader that checks presence\n * rather than truthiness, and the second makes a screen look like it has\n * an authored social card when it does not.\n * 2. **Carry untouched keys forward.** `updateDoc` REPLACES a nested map, so\n * a panel that edits two fields and writes a fresh map silently deletes\n * `breadcrumb` and anything else stored beside them.\n * 3. **Emptied means removed**, not stored blank — same reason as (1), and it\n * is what lets the head fall back to the site default.\n * 4. **The image, its dimensions and its alt move as ONE group.** An image\n * beside the previous image's size describes a card that does not exist,\n * and an image beside the previous image's DESCRIPTION describes one that\n * does — wrongly, to the reader least able to check (AGL-2417).\n *\n * Carrying keys forward is what makes both call sites the AGL-1358 shape:\n * `existing` comes off a Firestore LISTENER, so the write must still be\n * wrapped in `writeGuardedBySeed`. This function is pure and knows nothing\n * about that — it cannot be the place the guard is enforced, and neither call\n * site may treat it as one.\n */\n\n/**\n * A staged social image (AGL-1337).\n *\n * The dimensions travel WITH the reference, so this is one draft value rather\n * than three independent fields. An empty `image` is a real, saveable value\n * meaning \"cleared\", which the head reads as \"inherit the site default\".\n */\nexport interface ScreenSocialImageDraft {\n image: string\n imageWidth: number\n imageHeight: number\n /**\n * `og:image:alt` (AGL-2417). Defaults from the chosen asset's own alt at\n * pick time and is editable; optional because a screen saved before this\n * existed simply has none, and an absent key must stay absent rather than\n * becoming a stored `''`.\n */\n imageAlt?: string\n}\n\n/**\n * The staged edits. Every field is optional and `null`/`undefined` means the\n * author did not touch it — which is NOT the same as clearing it, and is the\n * distinction that keeps a save from writing over a field nobody opened.\n */\nexport interface ScreenSeoEdits {\n /** Staged search title. */\n title?: string | null\n /** Staged search description. */\n description?: string | null\n /** Staged breadcrumb label (AGL-2910). */\n breadcrumb?: string | null\n /** Staged social image; an empty `image` means the author cleared it. */\n image?: ScreenSocialImageDraft | null\n}\n\n/**\n * The text fields, which share their emptied-means-removed rule: the SEO\n * card's plain inputs (the listing's title and description, and the\n * breadcrumb label), from the one catalog both panels and every proposer read.\n */\nconst TEXT_FIELDS: readonly ScreenSeoCardTextField[] = SCREEN_SEO_CARD_TEXT_FIELDS\n\n/** The social image, its dimensions and its alt: written and removed together. */\nconst IMAGE_FIELDS = [\n 'image',\n 'imageWidth',\n 'imageHeight',\n 'imageAlt',\n] as const\n\n/**\n * Apply `edits` over the stored `seo` map.\n *\n * Returns the map to write, or `null` when nothing is left in it — the caller\n * writes `deleteField()` there rather than storing an empty map, which reads\n * back as an authored-but-blank SEO record.\n */\nexport function buildScreenSeoUpdate(\n existing: Record<string, unknown> | undefined | null,\n edits: ScreenSeoEdits,\n): Record<string, unknown> | null {\n const seo: Record<string, unknown> = { ...(existing ?? {}) }\n for (const field of TEXT_FIELDS) {\n const staged = edits[field]\n // Untouched. Whatever the document holds stays exactly as it is.\n if (staged == null) continue\n const value = staged.trim()\n if (value) seo[field] = value\n else delete seo[field]\n }\n if (edits.image != null) {\n if (edits.image.image) {\n seo.image = edits.image.image\n seo.imageWidth = edits.image.imageWidth\n seo.imageHeight = edits.image.imageHeight\n // Rule 1 again, for the newest member of the group: a blank alt is\n // REMOVED rather than stored. `og:image:alt=\"\"` asserts the image\n // conveys nothing, which is not what an undescribed card means — and a\n // stored `''` would make a screen look as though somebody had answered.\n const staged = String(edits.image.imageAlt ?? '').trim()\n if (staged) seo.imageAlt = staged\n else delete seo.imageAlt\n } else {\n for (const field of IMAGE_FIELDS) delete seo[field]\n }\n }\n return Object.keys(seo).length ? seo : null\n}\n\n"],"names":["SCREEN_SEO_CARD_TEXT_FIELDS","TEXT_FIELDS","IMAGE_FIELDS","buildScreenSeoUpdate","existing","edits","seo","field","staged","value","trim","image","imageWidth","imageHeight","String","imageAlt","Object","keys","length"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,2BAA2B,QAEtB,0BAAsB;AAmF7B;;;;CAIC,GACD,MAAMC,cAAiDD;AAEvD,gFAAgF,GAChF,MAAME,eAAe;IACnB;IACA;IACA;IACA;CACD;AAED;;;;;;CAMC,GACD,OAAO,SAASC,qBACdC,QAAoD,EACpDC,KAAqB;IAErB,MAAMC,MAA+B,aAAMF,mBAAAA,WAAY,CAAC;IACxD,KAAK,MAAMG,SAASN,YAAa;QAC/B,MAAMO,SAASH,KAAK,CAACE,MAAM;QAC3B,iEAAiE;QACjE,IAAIC,UAAU,MAAM;QACpB,MAAMC,QAAQD,OAAOE,IAAI;QACzB,IAAID,OAAOH,GAAG,CAACC,MAAM,GAAGE;aACnB,OAAOH,GAAG,CAACC,MAAM;IACxB;IACA,IAAIF,MAAMM,KAAK,IAAI,MAAM;QACvB,IAAIN,MAAMM,KAAK,CAACA,KAAK,EAAE;gBAQCN;YAPtBC,IAAIK,KAAK,GAAGN,MAAMM,KAAK,CAACA,KAAK;YAC7BL,IAAIM,UAAU,GAAGP,MAAMM,KAAK,CAACC,UAAU;YACvCN,IAAIO,WAAW,GAAGR,MAAMM,KAAK,CAACE,WAAW;YACzC,mEAAmE;YACnE,kEAAkE;YAClE,uEAAuE;YACvE,wEAAwE;YACxE,MAAML,SAASM,QAAOT,wBAAAA,MAAMM,KAAK,CAACI,QAAQ,YAApBV,wBAAwB,IAAIK,IAAI;YACtD,IAAIF,QAAQF,IAAIS,QAAQ,GAAGP;iBACtB,OAAOF,IAAIS,QAAQ;QAC1B,OAAO;YACL,KAAK,MAAMR,SAASL,aAAc,OAAOI,GAAG,CAACC,MAAM;QACrD;IACF;IACA,OAAOS,OAAOC,IAAI,CAACX,KAAKY,MAAM,GAAGZ,MAAM;AACzC"}
|
|
@@ -48,6 +48,14 @@ export interface SeoListingFieldDefinition {
|
|
|
48
48
|
}
|
|
49
49
|
/** A breadcrumb label: the page's short name in a trail. */
|
|
50
50
|
export declare const SEO_BREADCRUMB_MAX_LENGTH = 40;
|
|
51
|
+
/**
|
|
52
|
+
* The site-wide pieces of a page's title (Setup → SEO, AGL-4235): the
|
|
53
|
+
* separator between a page's name and the site title, and the pattern an
|
|
54
|
+
* untitled page is titled with. The form and the API hold them to these.
|
|
55
|
+
*/
|
|
56
|
+
export declare const SITE_SEO_SEPARATOR_MAX_LENGTH = 3;
|
|
57
|
+
/** The longest title pattern Setup → SEO accepts. */
|
|
58
|
+
export declare const SITE_SEO_TITLE_PATTERN_MAX_LENGTH = 120;
|
|
51
59
|
export declare const SEO_LISTING_FIELDS: Readonly<Record<SeoListingFieldKey, SeoListingFieldDefinition>>;
|
|
52
60
|
/**
|
|
53
61
|
* The fields the screen detail page's SEO card edits, in the order it draws
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
*/ import { MEDIA_ALT_MAX_LENGTH } from "./media-alt.js";
|
|
17
17
|
import { SCREEN_SEO_TEXT_FIELDS, SCREEN_SEO_TEXT_GUIDANCE } from "./screen-seo-fields.js";
|
|
18
18
|
/** A breadcrumb label: the page's short name in a trail. */ export const SEO_BREADCRUMB_MAX_LENGTH = 40;
|
|
19
|
+
/**
|
|
20
|
+
* The site-wide pieces of a page's title (Setup → SEO, AGL-4235): the
|
|
21
|
+
* separator between a page's name and the site title, and the pattern an
|
|
22
|
+
* untitled page is titled with. The form and the API hold them to these.
|
|
23
|
+
*/ export const SITE_SEO_SEPARATOR_MAX_LENGTH = 3;
|
|
24
|
+
/** The longest title pattern Setup → SEO accepts. */ export const SITE_SEO_TITLE_PATTERN_MAX_LENGTH = 120;
|
|
19
25
|
export const SEO_LISTING_FIELDS = {
|
|
20
26
|
title: {
|
|
21
27
|
key: 'title',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/seo-listing-fields.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { MEDIA_ALT_MAX_LENGTH } from './media-alt'\nimport { SCREEN_SEO_TEXT_FIELDS, SCREEN_SEO_TEXT_GUIDANCE } from './screen-seo-fields'\n\n/**\n * The fields of a search listing: what a search result and a share card say\n * about one page or one product, and how long each may be.\n *\n * One catalog, because more than one surface edits these and more than one\n * reader holds them to a length. The screen detail page's SEO card draws its\n * inputs from it, the besigner's SEO panel shares the counts, the commerce\n * product editor labels its search engine listing with it, and anything that\n * proposes a value — a template, an import, a generator — reads the same\n * limits the editor enforces instead of restating them. A limit written in\n * two places is a limit the two places disagree about the first time one of\n * them changes.\n *\n * The lengths are what a search result shows before it truncates: about 60\n * characters of a title and 155 of a description. A breadcrumb label is the\n * page's short name in a trail, so it is held shorter than the title it\n * usually abbreviates. The image description is an `alt`, and takes the\n * platform's one `alt` ceiling.\n */\n\n/** Every field a search listing editor may hold. */\nexport type SeoListingFieldKey = 'title' | 'description' | 'breadcrumb' | 'imageAlt'\n\nexport interface SeoListingFieldDefinition {\n key: SeoListingFieldKey\n /** The input's label, as the editors draw it. */\n label: string\n /** The longest value the editor accepts; a longer one is flagged, not trimmed. */\n maxLength: number\n /** Drawn as a multi-line input. */\n multiline?: boolean\n /** What the value is FOR, in a sentence an author or a generator can act on. */\n purpose: string\n}\n\n/** A breadcrumb label: the page's short name in a trail. */\nexport const SEO_BREADCRUMB_MAX_LENGTH = 40\n\nexport const SEO_LISTING_FIELDS: Readonly<Record<SeoListingFieldKey, SeoListingFieldDefinition>> = {\n title: {\n key: 'title',\n label: 'Title',\n maxLength: SCREEN_SEO_TEXT_GUIDANCE.title,\n purpose:\n 'The headline of the search result, published exactly as written; the site title is not appended to it.',\n },\n description: {\n key: 'description',\n label: 'Description',\n maxLength: SCREEN_SEO_TEXT_GUIDANCE.description,\n multiline: true,\n purpose: 'The summary a search result shows under the headline.',\n },\n breadcrumb: {\n key: 'breadcrumb',\n label: 'Breadcrumb label',\n maxLength: SEO_BREADCRUMB_MAX_LENGTH,\n purpose: 'The short name of the page where a breadcrumb trail names it.',\n },\n imageAlt: {\n key: 'imageAlt',\n label: 'Image description',\n maxLength: MEDIA_ALT_MAX_LENGTH,\n multiline: true,\n purpose:\n 'What the social image shows, read aloud in a share preview. It describes the picture, not the page.',\n },\n}\n\n/**\n * The fields the screen detail page's SEO card edits, in the order it draws\n * them. `imageAlt` is the social image's own description and is only editable\n * beside an image, which the card enforces.\n */\nexport const SCREEN_SEO_LISTING_FIELDS: readonly SeoListingFieldKey[] = [\n 'title',\n 'description',\n 'breadcrumb',\n 'imageAlt',\n]\n\n/**\n * The screen card's plain text inputs: every field but the image's\n * description. The listing's own title and description are the besigner's\n * `SCREEN_SEO_TEXT_FIELDS`; the card adds the breadcrumb label beside them.\n */\nexport const SCREEN_SEO_CARD_TEXT_FIELDS = [...SCREEN_SEO_TEXT_FIELDS, 'breadcrumb'] as const\n\nexport type ScreenSeoCardTextField = (typeof SCREEN_SEO_CARD_TEXT_FIELDS)[number]\n\n/** Whether a string names a field of the catalog. */\nexport function isSeoListingFieldKey(value: unknown): value is SeoListingFieldKey {\n return typeof value === 'string' && Object.prototype.hasOwnProperty.call(SEO_LISTING_FIELDS, value)\n}\n\n/** A field's counter text, `12/60`, as every editor prints it. */\nexport function seoListingFieldCount(key: SeoListingFieldKey, value: string | null | undefined): string {\n return `${String(value ?? '').length}/${SEO_LISTING_FIELDS[key].maxLength}`\n}\n\n/** Whether a value is over its field's length. */\nexport function seoListingFieldTooLong(key: SeoListingFieldKey, value: string | null | undefined): boolean {\n return String(value ?? '').length > SEO_LISTING_FIELDS[key].maxLength\n}\n"],"names":["MEDIA_ALT_MAX_LENGTH","SCREEN_SEO_TEXT_FIELDS","SCREEN_SEO_TEXT_GUIDANCE","SEO_BREADCRUMB_MAX_LENGTH","SEO_LISTING_FIELDS","title","key","label","maxLength","purpose","description","multiline","breadcrumb","imageAlt","SCREEN_SEO_LISTING_FIELDS","SCREEN_SEO_CARD_TEXT_FIELDS","isSeoListingFieldKey","value","Object","prototype","hasOwnProperty","call","seoListingFieldCount","String","length","seoListingFieldTooLong"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,oBAAoB,QAAQ,iBAAa;AAClD,SAASC,sBAAsB,EAAEC,wBAAwB,QAAQ,yBAAqB;AAqCtF,0DAA0D,GAC1D,OAAO,MAAMC,4BAA4B,GAAE;AAE3C,OAAO,MAAMC,qBAAsF;IACjGC,OAAO;QACLC,KAAK;QACLC,OAAO;QACPC,
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/seo-listing-fields.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { MEDIA_ALT_MAX_LENGTH } from './media-alt'\nimport { SCREEN_SEO_TEXT_FIELDS, SCREEN_SEO_TEXT_GUIDANCE } from './screen-seo-fields'\n\n/**\n * The fields of a search listing: what a search result and a share card say\n * about one page or one product, and how long each may be.\n *\n * One catalog, because more than one surface edits these and more than one\n * reader holds them to a length. The screen detail page's SEO card draws its\n * inputs from it, the besigner's SEO panel shares the counts, the commerce\n * product editor labels its search engine listing with it, and anything that\n * proposes a value — a template, an import, a generator — reads the same\n * limits the editor enforces instead of restating them. A limit written in\n * two places is a limit the two places disagree about the first time one of\n * them changes.\n *\n * The lengths are what a search result shows before it truncates: about 60\n * characters of a title and 155 of a description. A breadcrumb label is the\n * page's short name in a trail, so it is held shorter than the title it\n * usually abbreviates. The image description is an `alt`, and takes the\n * platform's one `alt` ceiling.\n */\n\n/** Every field a search listing editor may hold. */\nexport type SeoListingFieldKey = 'title' | 'description' | 'breadcrumb' | 'imageAlt'\n\nexport interface SeoListingFieldDefinition {\n key: SeoListingFieldKey\n /** The input's label, as the editors draw it. */\n label: string\n /** The longest value the editor accepts; a longer one is flagged, not trimmed. */\n maxLength: number\n /** Drawn as a multi-line input. */\n multiline?: boolean\n /** What the value is FOR, in a sentence an author or a generator can act on. */\n purpose: string\n}\n\n/** A breadcrumb label: the page's short name in a trail. */\nexport const SEO_BREADCRUMB_MAX_LENGTH = 40\n\n/**\n * The site-wide pieces of a page's title (Setup → SEO, AGL-4235): the\n * separator between a page's name and the site title, and the pattern an\n * untitled page is titled with. The form and the API hold them to these.\n */\nexport const SITE_SEO_SEPARATOR_MAX_LENGTH = 3\n\n/** The longest title pattern Setup → SEO accepts. */\nexport const SITE_SEO_TITLE_PATTERN_MAX_LENGTH = 120\n\nexport const SEO_LISTING_FIELDS: Readonly<Record<SeoListingFieldKey, SeoListingFieldDefinition>> = {\n title: {\n key: 'title',\n label: 'Title',\n maxLength: SCREEN_SEO_TEXT_GUIDANCE.title,\n purpose:\n 'The headline of the search result, published exactly as written; the site title is not appended to it.',\n },\n description: {\n key: 'description',\n label: 'Description',\n maxLength: SCREEN_SEO_TEXT_GUIDANCE.description,\n multiline: true,\n purpose: 'The summary a search result shows under the headline.',\n },\n breadcrumb: {\n key: 'breadcrumb',\n label: 'Breadcrumb label',\n maxLength: SEO_BREADCRUMB_MAX_LENGTH,\n purpose: 'The short name of the page where a breadcrumb trail names it.',\n },\n imageAlt: {\n key: 'imageAlt',\n label: 'Image description',\n maxLength: MEDIA_ALT_MAX_LENGTH,\n multiline: true,\n purpose:\n 'What the social image shows, read aloud in a share preview. It describes the picture, not the page.',\n },\n}\n\n/**\n * The fields the screen detail page's SEO card edits, in the order it draws\n * them. `imageAlt` is the social image's own description and is only editable\n * beside an image, which the card enforces.\n */\nexport const SCREEN_SEO_LISTING_FIELDS: readonly SeoListingFieldKey[] = [\n 'title',\n 'description',\n 'breadcrumb',\n 'imageAlt',\n]\n\n/**\n * The screen card's plain text inputs: every field but the image's\n * description. The listing's own title and description are the besigner's\n * `SCREEN_SEO_TEXT_FIELDS`; the card adds the breadcrumb label beside them.\n */\nexport const SCREEN_SEO_CARD_TEXT_FIELDS = [...SCREEN_SEO_TEXT_FIELDS, 'breadcrumb'] as const\n\nexport type ScreenSeoCardTextField = (typeof SCREEN_SEO_CARD_TEXT_FIELDS)[number]\n\n/** Whether a string names a field of the catalog. */\nexport function isSeoListingFieldKey(value: unknown): value is SeoListingFieldKey {\n return typeof value === 'string' && Object.prototype.hasOwnProperty.call(SEO_LISTING_FIELDS, value)\n}\n\n/** A field's counter text, `12/60`, as every editor prints it. */\nexport function seoListingFieldCount(key: SeoListingFieldKey, value: string | null | undefined): string {\n return `${String(value ?? '').length}/${SEO_LISTING_FIELDS[key].maxLength}`\n}\n\n/** Whether a value is over its field's length. */\nexport function seoListingFieldTooLong(key: SeoListingFieldKey, value: string | null | undefined): boolean {\n return String(value ?? '').length > SEO_LISTING_FIELDS[key].maxLength\n}\n"],"names":["MEDIA_ALT_MAX_LENGTH","SCREEN_SEO_TEXT_FIELDS","SCREEN_SEO_TEXT_GUIDANCE","SEO_BREADCRUMB_MAX_LENGTH","SITE_SEO_SEPARATOR_MAX_LENGTH","SITE_SEO_TITLE_PATTERN_MAX_LENGTH","SEO_LISTING_FIELDS","title","key","label","maxLength","purpose","description","multiline","breadcrumb","imageAlt","SCREEN_SEO_LISTING_FIELDS","SCREEN_SEO_CARD_TEXT_FIELDS","isSeoListingFieldKey","value","Object","prototype","hasOwnProperty","call","seoListingFieldCount","String","length","seoListingFieldTooLong"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,oBAAoB,QAAQ,iBAAa;AAClD,SAASC,sBAAsB,EAAEC,wBAAwB,QAAQ,yBAAqB;AAqCtF,0DAA0D,GAC1D,OAAO,MAAMC,4BAA4B,GAAE;AAE3C;;;;CAIC,GACD,OAAO,MAAMC,gCAAgC,EAAC;AAE9C,mDAAmD,GACnD,OAAO,MAAMC,oCAAoC,IAAG;AAEpD,OAAO,MAAMC,qBAAsF;IACjGC,OAAO;QACLC,KAAK;QACLC,OAAO;QACPC,WAAWR,yBAAyBK,KAAK;QACzCI,SACE;IACJ;IACAC,aAAa;QACXJ,KAAK;QACLC,OAAO;QACPC,WAAWR,yBAAyBU,WAAW;QAC/CC,WAAW;QACXF,SAAS;IACX;IACAG,YAAY;QACVN,KAAK;QACLC,OAAO;QACPC,WAAWP;QACXQ,SAAS;IACX;IACAI,UAAU;QACRP,KAAK;QACLC,OAAO;QACPC,WAAWV;QACXa,WAAW;QACXF,SACE;IACJ;AACF,EAAC;AAED;;;;CAIC,GACD,OAAO,MAAMK,4BAA2D;IACtE;IACA;IACA;IACA;CACD,CAAA;AAED;;;;CAIC,GACD,OAAO,MAAMC,8BAA8B;OAAIhB;IAAwB;CAAa,CAAS;AAI7F,mDAAmD,GACnD,OAAO,SAASiB,qBAAqBC,KAAc;IACjD,OAAO,OAAOA,UAAU,YAAYC,OAAOC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACjB,oBAAoBa;AAC/F;AAEA,gEAAgE,GAChE,OAAO,SAASK,qBAAqBhB,GAAuB,EAAEW,KAAgC;IAC5F,OAAO,GAAGM,OAAON,gBAAAA,QAAS,IAAIO,MAAM,CAAC,CAAC,EAAEpB,kBAAkB,CAACE,IAAI,CAACE,SAAS,EAAE;AAC7E;AAEA,gDAAgD,GAChD,OAAO,SAASiB,uBAAuBnB,GAAuB,EAAEW,KAAgC;IAC9F,OAAOM,OAAON,gBAAAA,QAAS,IAAIO,MAAM,GAAGpB,kBAAkB,CAACE,IAAI,CAACE,SAAS;AACvE"}
|
|
@@ -1827,6 +1827,12 @@ export const FIRST_PARTY_PLUGINS = [
|
|
|
1827
1827
|
"siteField": "hostId",
|
|
1828
1828
|
"mediaScan": "none",
|
|
1829
1829
|
"mediaScanReason": "An Assist exchange is one question a member typed and the answer Assist gave, kept as prose. A change Assist made lands on the site's own pages, which the scan reads; scanning the conversation would report an asset as used because someone asked about it. Exchanges expire on their own (`expiresAt`)."
|
|
1830
|
+
},
|
|
1831
|
+
{
|
|
1832
|
+
"pluginId": "waivers",
|
|
1833
|
+
"name": "waivers",
|
|
1834
|
+
"label": "Waiver",
|
|
1835
|
+
"siteField": "hostId"
|
|
1830
1836
|
}
|
|
1831
1837
|
];
|
|
1832
1838
|
/**
|