@aglyn/aglyn 1.0.0-beta.292 → 1.0.0-beta.296
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/analytics-events.d.ts +12 -2
- package/src/lib/app-utils/analytics-events.js.map +1 -1
- package/src/lib/app-utils/business-profile-values.d.ts +3 -2
- package/src/lib/app-utils/business-profile-values.js +4 -3
- package/src/lib/app-utils/business-profile-values.js.map +1 -1
- package/src/lib/app-utils/crm-kinds.d.ts +7 -1
- package/src/lib/app-utils/crm-kinds.js +11 -0
- package/src/lib/app-utils/crm-kinds.js.map +1 -1
- package/src/lib/app-utils/crm.d.ts +5 -1
- package/src/lib/app-utils/crm.js +51 -4
- package/src/lib/app-utils/crm.js.map +1 -1
- package/src/lib/app-utils/docs-help-sections.generated.js +8 -7
- package/src/lib/app-utils/docs-help-sections.generated.js.map +1 -1
- package/src/lib/app-utils/docs-help.generated.d.ts +9 -3
- package/src/lib/app-utils/docs-help.generated.js +20 -1
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +124 -40
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/notifications.d.ts +31 -2
- package/src/lib/app-utils/notifications.js +18 -2
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/app-utils/screen-version-publish.d.ts +71 -0
- package/src/lib/app-utils/screen-version-publish.js +82 -0
- package/src/lib/app-utils/screen-version-publish.js.map +1 -0
- package/src/lib/app-utils/server.d.ts +1 -0
- package/src/lib/app-utils/server.js +1 -0
- package/src/lib/app-utils/server.js.map +1 -1
- package/src/lib/app-utils/site-create-return.d.ts +63 -0
- package/src/lib/app-utils/site-create-return.js +72 -0
- package/src/lib/app-utils/site-create-return.js.map +1 -0
- package/src/lib/app-utils/site-starter-pick.d.ts +51 -0
- package/src/lib/app-utils/site-starter-pick.js +47 -0
- package/src/lib/app-utils/site-starter-pick.js.map +1 -0
- package/src/lib/app-utils/site-styles.d.ts +110 -0
- package/src/lib/app-utils/site-styles.js +126 -0
- package/src/lib/app-utils/site-styles.js.map +1 -0
- package/src/lib/app-utils/site-unavailable.d.ts +96 -0
- package/src/lib/app-utils/site-unavailable.js +80 -0
- package/src/lib/app-utils/site-unavailable.js.map +1 -0
- package/src/lib/app-utils/version-draft.d.ts +31 -0
- package/src/lib/app-utils/version-draft.js +29 -0
- package/src/lib/app-utils/version-draft.js.map +1 -0
- package/src/lib/app-utils/visitor-upload.d.ts +19 -0
- package/src/lib/app-utils/visitor-upload.js +29 -1
- package/src/lib/app-utils/visitor-upload.js.map +1 -1
- package/src/lib/foundation/definitions/platform.types.d.ts +9 -0
- package/src/lib/foundation/definitions/platform.types.js.map +1 -1
- package/src/lib/plugin-manager/feature-plugins.d.ts +68 -13
- package/src/lib/plugin-manager/feature-plugins.js +16 -9
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-timeline.d.ts +5 -2
- package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
- package/src/lib/plugin-manager/plugin-site-starters.d.ts +30 -0
- package/src/lib/plugin-manager/plugin-site-starters.js +19 -0
- package/src/lib/plugin-manager/plugin-site-starters.js.map +1 -1
- package/src/lib/plugin-manager/plugin-site-style-looks.d.ts +43 -0
- package/src/lib/plugin-manager/plugin-site-style-looks.js +30 -0
- package/src/lib/plugin-manager/plugin-site-style-looks.js.map +1 -0
- package/src/lib/plugin-manager/plugin-upload-storage-gate.d.ts +60 -0
- package/src/lib/plugin-manager/plugin-upload-storage-gate.js +32 -0
- package/src/lib/plugin-manager/plugin-upload-storage-gate.js.map +1 -0
|
@@ -0,0 +1,82 @@
|
|
|
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 { blockingRouteOwner, composeScreenRoutePath, SCREEN_KIND_ERROR, SCREEN_KIND_GROUP, SCREEN_KIND_TEMPLATE, screenRoutePathToUrl, toScreenRouteNode } from "./screen-route.js";
|
|
18
|
+
import { normalizeScreenSlug, reservedScreenRouteMessage, reservedScreenRouteSegment } from "./screen-slug.js";
|
|
19
|
+
export const SCREEN_VERSION_PUBLISH_DELETED = 'This page was deleted.';
|
|
20
|
+
export const SCREEN_VERSION_PUBLISH_NO_ADDRESS = 'This page has no address yet. Give it one in the Besigner, then publish it.';
|
|
21
|
+
export const SCREEN_VERSION_PUBLISH_NO_PARENT_ADDRESS = 'A page above this one is not published, so this page has no address yet. Publish that page first.';
|
|
22
|
+
/** Kinds of screen whose Publish is the Besigner's alone, each with why. */ const PUBLISHED_IN_THE_BESIGNER = {
|
|
23
|
+
[SCREEN_KIND_TEMPLATE]: 'A collection template is published from the Besigner.',
|
|
24
|
+
[SCREEN_KIND_ERROR]: 'An error page is published from the Besigner.',
|
|
25
|
+
[SCREEN_KIND_GROUP]: 'A page group has no version to publish.',
|
|
26
|
+
email: 'An email is sent by campaigns, not published as a page.'
|
|
27
|
+
};
|
|
28
|
+
export const screenVersionPublishTakenCopy = (path)=>`Another page is already published at ${screenRoutePathToUrl(path)}. Give this one another address in the Besigner.`;
|
|
29
|
+
export function screenVersionPublish(input) {
|
|
30
|
+
const { screenId, versionId, screen, routingMap } = input;
|
|
31
|
+
if (!screen || screen.deletedAt != null) return {
|
|
32
|
+
kind: 'blocked',
|
|
33
|
+
reason: SCREEN_VERSION_PUBLISH_DELETED
|
|
34
|
+
};
|
|
35
|
+
const elsewhere = typeof screen.kind === 'string' ? PUBLISHED_IN_THE_BESIGNER[screen.kind] : undefined;
|
|
36
|
+
if (elsewhere) return {
|
|
37
|
+
kind: 'blocked',
|
|
38
|
+
reason: elsewhere
|
|
39
|
+
};
|
|
40
|
+
const routed = routingMap == null ? void 0 : routingMap[screenId];
|
|
41
|
+
if (typeof routed === 'string') {
|
|
42
|
+
return screen.versionId === versionId ? {
|
|
43
|
+
kind: 'live',
|
|
44
|
+
path: routed
|
|
45
|
+
} : {
|
|
46
|
+
kind: 'replace',
|
|
47
|
+
path: routed,
|
|
48
|
+
placeholder: screenId === input.defaultHomeScreenId
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const slug = normalizeScreenSlug(typeof screen.slug === 'string' ? screen.slug : '');
|
|
52
|
+
if (!slug) return {
|
|
53
|
+
kind: 'blocked',
|
|
54
|
+
reason: SCREEN_VERSION_PUBLISH_NO_ADDRESS
|
|
55
|
+
};
|
|
56
|
+
const path = composeScreenRoutePath(screenId, _extends({}, input.screensById, {
|
|
57
|
+
[screenId]: _extends({}, toScreenRouteNode(screen), {
|
|
58
|
+
slug
|
|
59
|
+
})
|
|
60
|
+
}));
|
|
61
|
+
if (!path) return {
|
|
62
|
+
kind: 'blocked',
|
|
63
|
+
reason: SCREEN_VERSION_PUBLISH_NO_PARENT_ADDRESS
|
|
64
|
+
};
|
|
65
|
+
const reserved = reservedScreenRouteSegment(path);
|
|
66
|
+
if (reserved) return {
|
|
67
|
+
kind: 'blocked',
|
|
68
|
+
reason: reservedScreenRouteMessage(reserved)
|
|
69
|
+
};
|
|
70
|
+
const owner = blockingRouteOwner(routingMap, path, input.defaultHomeScreenId);
|
|
71
|
+
if (owner && owner !== screenId) return {
|
|
72
|
+
kind: 'blocked',
|
|
73
|
+
reason: screenVersionPublishTakenCopy(path)
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
kind: 'first',
|
|
77
|
+
slug,
|
|
78
|
+
path
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=screen-version-publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/screen-version-publish.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 blockingRouteOwner,\n composeScreenRoutePath,\n SCREEN_KIND_ERROR,\n SCREEN_KIND_GROUP,\n SCREEN_KIND_TEMPLATE,\n screenRoutePathToUrl,\n toScreenRouteNode,\n type ScreenRouteNode,\n} from './screen-route'\nimport { normalizeScreenSlug, reservedScreenRouteMessage, reservedScreenRouteSegment } from './screen-slug'\n\n/**\n * What Publish does to one version of a page, from outside the Besigner\n * (AGL-3616): the preview of a version an AI job wrote leads with it.\n *\n * - `live` — the site already serves this version at `path`; nothing to do.\n * - `replace` — the page is live with another version: Publish makes this\n * one the version the site serves at `path`. `placeholder` where the page\n * is the site's placeholder home (AGL-3478), which publishes through the\n * route seam so it becomes the owner's.\n * - `first` — the page is not on the site: Publish puts it at `path`, its\n * own `slug` under its parents, with this version.\n * - `blocked` — Publish cannot be done from here, and `reason` says why in\n * the words the person reads. The Besigner is where each is fixed.\n *\n * The same refusals, in the same order, as the page's own Publish: no\n * address, a parent with none, a reserved address, an address another page\n * holds.\n */\nexport type ScreenVersionPublish =\n | { kind: 'live'; path: string }\n | { kind: 'replace'; path: string; placeholder: boolean }\n | { kind: 'first'; slug: string; path: string }\n | { kind: 'blocked'; reason: string }\n\nexport const SCREEN_VERSION_PUBLISH_DELETED = 'This page was deleted.'\nexport const SCREEN_VERSION_PUBLISH_NO_ADDRESS =\n 'This page has no address yet. Give it one in the Besigner, then publish it.'\nexport const SCREEN_VERSION_PUBLISH_NO_PARENT_ADDRESS =\n 'A page above this one is not published, so this page has no address yet. Publish that page first.'\n/** Kinds of screen whose Publish is the Besigner's alone, each with why. */\nconst PUBLISHED_IN_THE_BESIGNER: Readonly<Record<string, string>> = {\n [SCREEN_KIND_TEMPLATE]: 'A collection template is published from the Besigner.',\n [SCREEN_KIND_ERROR]: 'An error page is published from the Besigner.',\n [SCREEN_KIND_GROUP]: 'A page group has no version to publish.',\n email: 'An email is sent by campaigns, not published as a page.',\n}\n\nexport const screenVersionPublishTakenCopy = (path: string): string =>\n `Another page is already published at ${screenRoutePathToUrl(path)}. Give this one another address in the Besigner.`\n\nexport function screenVersionPublish(input: {\n screenId: string\n versionId: string\n /** The page's document, `null` where it is gone. */\n screen: { versionId?: unknown; slug?: unknown; kind?: unknown; parentId?: unknown; deletedAt?: unknown } | null\n /** The site's routing map, `host.screens`. */\n routingMap: Readonly<Record<string, string>> | null | undefined\n /** Every page of the site as path composition reads it (`toScreenRouteNode`). */\n screensById: Readonly<Record<string, ScreenRouteNode | undefined>>\n defaultHomeScreenId?: string | null\n}): ScreenVersionPublish {\n const { screenId, versionId, screen, routingMap } = input\n if (!screen || screen.deletedAt != null) return { kind: 'blocked', reason: SCREEN_VERSION_PUBLISH_DELETED }\n const elsewhere = typeof screen.kind === 'string' ? PUBLISHED_IN_THE_BESIGNER[screen.kind] : undefined\n if (elsewhere) return { kind: 'blocked', reason: elsewhere }\n const routed = routingMap?.[screenId]\n if (typeof routed === 'string') {\n return screen.versionId === versionId\n ? { kind: 'live', path: routed }\n : { kind: 'replace', path: routed, placeholder: screenId === input.defaultHomeScreenId }\n }\n const slug = normalizeScreenSlug(typeof screen.slug === 'string' ? screen.slug : '')\n if (!slug) return { kind: 'blocked', reason: SCREEN_VERSION_PUBLISH_NO_ADDRESS }\n const path = composeScreenRoutePath(screenId, {\n ...input.screensById,\n [screenId]: { ...toScreenRouteNode(screen), slug },\n })\n if (!path) return { kind: 'blocked', reason: SCREEN_VERSION_PUBLISH_NO_PARENT_ADDRESS }\n const reserved = reservedScreenRouteSegment(path)\n if (reserved) return { kind: 'blocked', reason: reservedScreenRouteMessage(reserved) }\n const owner = blockingRouteOwner(routingMap, path, input.defaultHomeScreenId)\n if (owner && owner !== screenId) return { kind: 'blocked', reason: screenVersionPublishTakenCopy(path) }\n return { kind: 'first', slug, path }\n}\n"],"names":["blockingRouteOwner","composeScreenRoutePath","SCREEN_KIND_ERROR","SCREEN_KIND_GROUP","SCREEN_KIND_TEMPLATE","screenRoutePathToUrl","toScreenRouteNode","normalizeScreenSlug","reservedScreenRouteMessage","reservedScreenRouteSegment","SCREEN_VERSION_PUBLISH_DELETED","SCREEN_VERSION_PUBLISH_NO_ADDRESS","SCREEN_VERSION_PUBLISH_NO_PARENT_ADDRESS","PUBLISHED_IN_THE_BESIGNER","email","screenVersionPublishTakenCopy","path","screenVersionPublish","input","screenId","versionId","screen","routingMap","deletedAt","kind","reason","elsewhere","undefined","routed","placeholder","defaultHomeScreenId","slug","screensById","reserved","owner"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,kBAAkB,EAClBC,sBAAsB,EACtBC,iBAAiB,EACjBC,iBAAiB,EACjBC,oBAAoB,EACpBC,oBAAoB,EACpBC,iBAAiB,QAEZ,oBAAgB;AACvB,SAASC,mBAAmB,EAAEC,0BAA0B,EAAEC,0BAA0B,QAAQ,mBAAe;AA0B3G,OAAO,MAAMC,iCAAiC,yBAAwB;AACtE,OAAO,MAAMC,oCACX,8EAA6E;AAC/E,OAAO,MAAMC,2CACX,oGAAmG;AACrG,0EAA0E,GAC1E,MAAMC,4BA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rF,MAAMC,QAAQlC,mBAAmBsB,YAAYN,MAAME,MAAMY,mBAAmB;IAC5E,IAAII,SAASA,UAAUf,UAAU,OAAO;QAAEK,MAAM;QAAWC,QAAQV,8BAA8BC;IAAM;IACvG,OAAO;QAAEQ,MAAM;QAASO;QAAMf;IAAK;AACrC"}
|
|
@@ -128,6 +128,7 @@ export * from './ensure-canvas-root';
|
|
|
128
128
|
export * from './repair-canvas-nodes';
|
|
129
129
|
export * from './detect-template-placeholders';
|
|
130
130
|
export * from './guarded-version-save';
|
|
131
|
+
export * from './version-draft';
|
|
131
132
|
export * from './local-storage-budget';
|
|
132
133
|
export * from './measure-node-map';
|
|
133
134
|
export * from './resolve-named-tokens';
|
|
@@ -263,6 +263,7 @@ export * from "./ensure-canvas-root.js";
|
|
|
263
263
|
export * from "./repair-canvas-nodes.js";
|
|
264
264
|
export * from "./detect-template-placeholders.js";
|
|
265
265
|
export * from "./guarded-version-save.js";
|
|
266
|
+
export * from "./version-draft.js";
|
|
266
267
|
export * from "./local-storage-budget.js";
|
|
267
268
|
export * from "./measure-node-map.js";
|
|
268
269
|
export * from "./resolve-named-tokens.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/server.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 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\n/**\n * Server-safe app-utils: every app-util EXCEPT the client-only React\n * contexts (see ./contexts). Nothing here calls `createContext` at module\n * scope, so this barrel — re-exported by `@aglyn/aglyn/server` — is safe to\n * import from tenant Server Components (AGL-405). The full `./index` barrel\n * re-adds the contexts for client consumers.\n */\nexport * from './binding-token-catalog'\nexport * from './binding-tokens'\nexport * from './breadcrumb-json-ld'\n// What a search listing holds and how long each field may be (AGL-2910):\n// the SEO editors and anything that proposes a value read one catalog.\nexport * from './seo-listing-fields'\n// `VideoObject` for the Video elements a page actually ships (AGL-2747).\n// Beside the other structured-data builders, and server-only like them: only\n// the route emits JSON-LD, and a crawler-facing block has no client caller.\nexport * from './video-object'\n// `FAQPage` for the FAQ section a page draws (AGL-3574): the same input, the\n// same reason, and server-only for the same one — only the route emits it.\nexport * from './faq-page'\nexport * from './collection-delete'\nexport * from './collection-entries'\nexport * from './collection-kind'\nexport * from './collection-slug'\nexport * from './content-authors'\n// NOT re-exported: `./local-business` and `./site-entity-json-ld` (AGL-3383).\n// This barrel is the whole namespace a realm bundle is handed and part of the\n// runtime a published page loads (`check:tenant-wire-weight`); the site\n// entity's JSON-LD and the LocalBusiness allow-list are read only by the\n// tenant page's server render and the console's Setup → SEO card, which import\n// them by path (`@aglyn/aglyn/app-utils/...`).\nexport * from './content-query-fields'\nexport * from './content-schema-type'\nexport * from './content-author-profile'\nexport * from './url-slug'\nexport * from './child-contract'\nexport * from './child-contract-compose'\n// The one reading of `restrictChildren`/`restrictParent`, shared by the\n// besigner's drop check and the AI plugin's node-tree validator (AGL-2905).\nexport * from './lineal-order'\n// What a portable node tree must satisfy before it lands on a canvas that did\n// not author it (AGL-2939): a tree installed from another workspace and a tree\n// a model generated both pass through it.\nexport * from './node-definition-sanitizer'\nexport * from './console-routes'\n// What a stored screen-link value means, with no React attached — the\n// where-used scan reads these on the server (AGL-703).\nexport * from './screen-link-value'\n// Which entries a page's links name (AGL-3118). The tenant render reads\n// exactly those entry documents, so the walk runs on the server.\nexport * from './link-references'\nexport * from './analytics-path-key'\nexport * from './contacts'\n// A lead's or a contact's email state (AGL-3245): the last verdict on its\n// address, in words a person can act on, mirrored from the senders' lists.\nexport * from './email-state'\n// A field whose choices an admin keeps (AGL-3510): standard values built in,\n// the organization's own beside them, and the judge every write asks. Pure,\n// and named for no plugin — a plugin's registry of picklists sits on top.\nexport * from './picklists'\n// The records that sit beside a contact — companies, pipelines, deals, tasks,\n// activities, field definitions (AGL-2595). Pure like `contacts`, and beside\n// it because `ContactFacet` names its lifecycle stage and custom-value types;\n// the scope stamp every CRM creator writes lives here too.\nexport * from './crm'\n// Email templates, snippets and the merge-field resolver (AGL-2658): the\n// letter a rep keeps under a name, and the one grammar the send route and\n// the dialog fill it in by. Pure like `crm`, and beside it because a\n// template is scoped the way a task is.\nexport * from './crm-email-templates'\n// A person's privacy erasure from one workspace (AGL-2623): the request's\n// shape and id, the marker a record carries while it waits, and the lists\n// the dialog and the docs share. Pure like `crm`; the sweep is server-side.\nexport * from './person-erasure'\n// A task's reminder at its own time (AGL-2659): which reminder a save\n// leaves, whether one is owed, and the words the notification and the mail\n// say. Pure like `crm`, read by the hourly route and by every writer of the\n// field.\n// Reading a received email (AGL-2657): the address in a header, the thread\n// a subject belongs to, the reply above the quoted history — and the domain\n// the platform receives mail on. Pure; every surface that reads mail it was\n// sent reads it this way.\nexport * from './email-text'\nexport * from './inbound-mail-domain'\n// A member's own addresses in a workspace (AGL-2975): the ones they have\n// confirmed count as theirs wherever the roster is asked who wrote a\n// message. Pure; the store and the confirmation link are server-side.\nexport * from './member-email-aliases'\n// The CSV cell grammar the exports write with (AGL-2621), and the target a\n// mapped column names for a custom field — named rather than starred, because\n// an importer built on this file exports the shared ceilings under its own\n// names.\nexport {\n csvCell,\n csvDocument,\n customImportTarget,\n customImportTargetKey,\n importNoMailServerSentence,\n} from './csv-import'\nexport type {\n ImportChunkResult,\n ImportDroppedValue,\n ImportSkippedRow,\n} from './csv-import'\n// What a VALUE under a custom contact field may be, and the coercion every\n// door applies to one (AGL-2601): a mapped form field, an API `custom` body,\n// and the carry-over that keeps a mapping across a publish. Pure like `crm`.\nexport * from './contact-custom-fields'\n// The consent JOIN (`docs/specs/email-overhaul.md` §3f). Pure, and it composes\n// `contacts` for the normalizer, so it sits directly beside it. No Node\n// builtin, which is what keeps it out of the `/server`-only group `person-key`\n// belongs to.\nexport * from './consent-groups'\nexport * from './marketing-consent'\n// A refusal kept after the record it was written on is deleted (AGL-3338),\n// read back through the same parser as the record's own.\nexport * from './retained-refusals'\n// The ENROLLMENT-time half of the same question, beside its reader for the\n// same reason: `marketing-consent` decides whether a recorded basis lets us\n// mail somebody, and this decides what basis putting them on a list may\n// record. Two enrollment surfaces import it — the Inbox assignment route and\n// the Emails console's audience card — and neither could import the other.\nexport * from './enrollment-basis'\n// Reading the FILE a merchant arrives with (`docs/specs/email-competitive-gaps.md`\n// G5/P4), directly after the policy it hands its addresses to: parsing and\n// mechanical screening only, so that an import asks the enrollment question\n// through the same module the one-address add path asks it through rather\n// than answering it a second way.\n// The dynamic-list rule (§3b/§3c), beside it for the same reasons: pure, and\n// it composes `contacts` for the segment vocabulary rather than restating it.\nexport * from './dynamic-list-rule'\n// The subscribable streams a recipient can leave one at a time\n// (`docs/specs/email-competitive-gaps.md` §1f). Pure, and read from all three\n// sides of the feature: the composer picks one, the send path signs it into\n// the unsubscribe link, and the unauthenticated preference page renders the\n// catalog. No Node builtin, so it stays out of the `/server`-only group.\nexport * from './subscription-topics'\nexport * from './compose-layout-nodes'\n// Layout properties applied through the chain (AGL-2893).\nexport * from './compose-layout-props'\n// A screen's per-page restyling of its layout's elements (AGL-3286).\nexport * from './layout-style-overrides'\nexport * from './document-landmark'\nexport * from './functions'\nexport * from './compose-reusable-components'\n// Where a reusable component is placed — pages or emails (AGL-3287).\nexport * from './reusable-component-kind'\nexport * from './compress'\nexport * from './merge-node-sx'\nexport * from './palette-sx'\nexport * from './scheme-sx'\n// An element pinned to one color scheme (AGL-3284).\nexport * from './element-color-scheme'\nexport * from './create-resource-uid'\nexport * from './decompress'\nexport * from './stored-nodes'\nexport * from './strip-undefined'\nexport * from './organizations'\nexport * from './org-permissions'\n// The AI verdict on either membership axis (AGL-2927). After both modules it\n// composes: the org catalog for org-wide members, the host role for site\n// collaborators.\nexport * from './host-permissions'\nexport * from './password-policy'\nexport * from './idp-profile'\nexport * from './onboarding-deep-link'\n// The platform team's ask that a workspace buy a plan (AGL-3466), beside the\n// plan intent its button carries into Billing.\nexport * from './upgrade-proposal'\n// Where an account came from (AGL-1731). Beside the plan intent because\n// they are the same hop — the marketing CTA's query string — and both are\n// remembered on `users/{uid}` across the verification wall.\nexport * from './utm-attribution'\n// What a record is filed under: the edge between a container a plugin keeps\n// (a campaign) and the forms, screens and contacts it gathers. Beside the\n// attribution above because the two answer opposite questions: attribution\n// records where somebody CAME from, this records what a merchant DECLARED\n// belongs together.\nexport * from './container-membership'\nexport * from './deployment-shape'\n// Which browser origins may complete a signed direct-to-GCS upload (AGL-1452).\n// GCS matches the origin list EXACTLY, so every serving console name needs its\n// own entry — the rule nobody could be expected to remember at attach time.\nexport * from './upload-cors'\n// The docs-help subset the first-party plugin consoles read (AGL-2213) — the\n// console's own registry lives in apps/console/constants and a lib cannot\n// import an app.\nexport * from './docs-help'\nexport * from './platform-brand'\nexport * from './plan-entitlements'\n// The free plan's bandwidth hard cap (AGL-1967/2070/2155). After\n// `plan-entitlements`, which owns the predicate it keys off.\nexport * from './bandwidth-cap'\n// Video and file delivery as bandwidth (AGL-3474), in the band's own units.\nexport * from './media-bandwidth'\n// The month every monthly counter is keyed by, and the boundary it lifts on.\nexport * from './utc-month'\nexport * from './forms'\n// What a form's DESIGN must still satisfy for its submissions to arrive.\n// After `forms`, whose field walk it reads the drawn fields with.\nexport * from './form-contract'\nexport * from './visitor-record-ceiling'\nexport * from './health-report'\n// Did a webhook delivery actually DO anything (AGL-1954)? After\n// `health-report`, whose billing verdict consumes the counts this produces.\nexport * from './webhook-delivery'\nexport * from './support-tiers'\n// Site Care requests (AGL-3959): the arithmetic, and the two modules any\n// staff-recorded, approval-gated charge reuses (AGL-3970).\nexport * from './site-care'\nexport * from './owner-approval-record'\nexport * from './append-only-history'\n// Site Care projects (AGL-3970): the flat quote, its split and its record.\nexport * from './site-care-project'\nexport * from './release-flags'\n// Who runs THIS deployment, and where its notices go (AGL-2016). Ordered\n// before the four surfaces that print it, all of which used to declare their\n// own `support@aglyn.com` literal.\nexport * from './operator-identity'\nexport * from './lockdown'\nexport * from './media-quarantine'\nexport * from './media-takedown-reach'\nexport * from './upload-inspection'\nexport * from './abuse-report'\n// The other three quarters of §512 (AGL-1983): the put-back procedure that\n// answers a notice, and the strike ledger that conditions the safe harbour.\nexport * from './dmca-counter-notice'\nexport * from './repeat-infringer'\n// `addBusinessDays` briefly existed TWICE — once here in './support-tiers'\n// and once in './dmca-counter-notice' — and two `export *` made the name\n// ambiguous, TS2308'ing this barrel and every tsconfig that reads it. The\n// interleave was fixed twice in parallel: once by naming a winner here, and\n// once by deleting the second definition so './dmca-counter-notice' imports\n// this one. Only the deletion survives, so the disambiguating re-export that\n// stood on this line is gone with it — `export *` is unambiguous again.\n//\n// The concern that argued for keeping two copies is worth answering rather\n// than dropping: a later tweak to the SUPPORT SLA window must never silently\n// move the §512(g)(2)(C) put-back deadline. It cannot. This function embeds\n// no window — it is \"add N business days\", and N is the argument. The two\n// windows live in their own constants (`SUPPORT_*` there,\n// `COUNTER_NOTICE_*_BUSINESS_DAYS` in the DMCA module) and never meet. What\n// SHOULD stay shared is the day arithmetic itself: two copies of a weekend\n// rule are two chances to disagree about which day a deadline falls on.\nexport * from './org-override-reason'\nexport * from './host-tokens'\nexport * from './variables'\n// What happened on a site that an automation can start on: the platform's\n// own event and the ones plugins declare (AGL-3080).\nexport * from './host-events'\nexport * from './expand-repeatables'\nexport * from './org-roles'\nexport * from './markdown-lite'\nexport * from './notifications'\n// The operator alert registry (AGL-3377); OPERATOR_ALERT_NOTIFICATION_TYPES\n// lives here now, derived from it.\nexport * from './operator-alerts'\nexport * from './definition-canvas-tree'\nexport * from './ensure-canvas-root'\nexport * from './repair-canvas-nodes'\nexport * from './detect-template-placeholders'\nexport * from './guarded-version-save'\nexport * from './local-storage-budget'\nexport * from './measure-node-map'\nexport * from './resolve-named-tokens'\nexport * from './screen-route'\nexport * from './host-naming'\nexport * from './name-search'\nexport * from './artifact-list-keys'\nexport * from './name-match'\nexport * from './api-plugins'\nexport * from './plugin-api-rate-limit'\n// The same-origin gate on visitor-facing plugin writes (AGL-1880). After\n// `plugin-api-rate-limit`, whose `isMachinePluginApiPath` it reuses so the\n// two gates exempt exactly the same machine surfaces.\nexport * from './plugin-api-cross-origin'\n// What a published page does when a visitor does something (AGL-3080): the\n// platform's interaction vocabulary, which the workflows plugin builds its\n// automations on.\nexport * from './site-interactions'\nexport * from './element-animation'\nexport * from './attribution-guard'\nexport * from './node-interactions'\nexport * from './element-ui'\nexport * from './image-upload-types'\nexport * from './sanitize-svg'\nexport * from './media-folders'\nexport * from './media-metadata'\nexport * from './media-ref'\nexport * from './rendered-widths'\n// After `media-ref`, whose reference grammar it reads stored URLs with.\nexport * from './paid-media-source'\nexport * from './author-css'\n// The isomorphic HTML rule (AGL-1901), after the CSS one it depends on.\nexport * from './author-html'\nexport * from './csv'\nexport * from './csv-upload'\nexport * from './artifact-provenance'\nexport * from './repeat-query'\nexport * from './plugin-manifest'\n// After `plugin-manifest`, whose revocation predicates it asks the kill\n// question with, and after `media-ref`, whose grammar decides what counts as a\n// first-party image.\nexport * from './email-starter-policy'\nexport * from './safe-json-ld'\n// Agent readiness (AGL-2716): content negotiation, the Markdown rendering of a\n// page, `/llms.txt` and the per-site OpenAPI document. All pure, all server-safe.\nexport * from './accept-negotiation'\nexport * from './agent-api-catalog'\nexport * from './agent-openapi'\nexport * from './author-html-markdown'\nexport * from './llms-txt'\nexport * from './page-markdown'\nexport * from './request-geo'\nexport * from './request-ip'\nexport * from './search-indexing'\n// Preview: a site or page only its team can see (AGL-4086).\nexport * from './site-preview'\nexport * from './seo-title'\nexport * from './sitemap'\nexport * from './visitor-consent'\nexport * from './social-image'\nexport * from './scope-tokens'\nexport * from './org-billing-doc'\nexport * from './stripe-deployment-mode'\nexport * from './deferred-image'\n"],"names":["csvCell","csvDocument","customImportTarget","customImportTargetKey","importNoMailServerSentence"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;CAMC,GACD,cAAc,6BAAyB;AACvC,cAAc,sBAAkB;AAChC,cAAc,0BAAsB;AACpC,yEAAyE;AACzE,uEAAuE;AACvE,cAAc,0BAAsB;AACpC,yEAAyE;AACzE,6EAA6E;AAC7E,4EAA4E;AAC5E,cAAc,oBAAgB;AAC9B,6EAA6E;AAC7E,2EAA2E;AAC3E,cAAc,gBAAY;AAC1B,cAAc,yBAAqB;AACnC,cAAc,0BAAsB;AACpC,cAAc,uBAAmB;AACjC,cAAc,uBAAmB;AACjC,cAAc,uBAAmB;AACjC,8EAA8E;AAC9E,8EAA8E;AAC9E,wEAAwE;AACxE,yEAAyE;AACzE,+EAA+E;AAC/E,+CAA+C;AAC/C,cAAc,4BAAwB;AACtC,cAAc,2BAAuB;AACrC,cAAc,8BAA0B;AACxC,cAAc,gBAAY;AAC1B,cAAc,sBAAkB;AAChC,cAAc,8BAA0B;AACxC,wEAAwE;AACxE,4EAA4E;AAC5E,cAAc,oBAAgB;AAC9B,8EAA8E;AAC9E,+EAA+E;AAC/E,0CAA0C;AAC1C,cAAc,iCAA6B;AAC3C,cAAc,sBAAkB;AAChC,sEAAsE;AACtE,uDAAuD;AACvD,cAAc,yBAAqB;AACnC,wEAAwE;AACxE,iEAAiE;AACjE,cAAc,uBAAmB;AACjC,cAAc,0BAAsB;AACpC,cAAc,gBAAY;AAC1B,0EAA0E;AAC1E,2EAA2E;AAC3E,cAAc,mBAAe;AAC7B,6EAA6E;AAC7E,4EAA4E;AAC5E,0EAA0E;AAC1E,cAAc,iBAAa;AAC3B,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,2DAA2D;AAC3D,cAAc,WAAO;AACrB,yEAAyE;AACzE,0EAA0E;AAC1E,qEAAqE;AACrE,wCAAwC;AACxC,cAAc,2BAAuB;AACrC,0EAA0E;AAC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;AAC/B,cAAc,sBAAkB;AAChC,cAAc,iBAAa;AAC3B,cAAc,uBAAmB;AACjC,wEAAwE;AACxE,cAAc,yBAAqB;AACnC,cAAc,kBAAc;AAC5B,wEAAwE;AACxE,cAAc,mBAAe;AAC7B,cAAc,WAAO;AACrB,cAAc,kBAAc;AAC5B,cAAc,2BAAuB;AACrC,cAAc,oBAAgB;AAC9B,cAAc,uBAAmB;AACjC,wEAAwE;AACxE,+EAA+E;AAC/E,qBAAqB;AACrB,cAAc,4BAAwB;AACtC,cAAc,oBAAgB;AAC9B,+EAA+E;AAC/E,kFAAkF;AAClF,cAAc,0BAAsB;AACpC,cAAc,yBAAqB;AACnC,cAAc,qBAAiB;AAC/B,cAAc,4BAAwB;AACtC,cAAc,gBAAY;AAC1B,cAAc,qBAAiB;AAC/B,cAAc,mBAAe;AAC7B,cAAc,kBAAc;AAC5B,cAAc,uBAAmB;AACjC,4DAA4D;AAC5D,cAAc,oBAAgB;AAC9B,cAAc,iBAAa;AAC3B,cAAc,eAAW;AACzB,cAAc,uBAAmB;AACjC,cAAc,oBAAgB;AAC9B,cAAc,oBAAgB;AAC9B,cAAc,uBAAmB;AACjC,cAAc,8BAA0B;AACxC,cAAc,sBAAkB"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/server.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 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\n/**\n * Server-safe app-utils: every app-util EXCEPT the client-only React\n * contexts (see ./contexts). Nothing here calls `createContext` at module\n * scope, so this barrel — re-exported by `@aglyn/aglyn/server` — is safe to\n * import from tenant Server Components (AGL-405). The full `./index` barrel\n * re-adds the contexts for client consumers.\n */\nexport * from './binding-token-catalog'\nexport * from './binding-tokens'\nexport * from './breadcrumb-json-ld'\n// What a search listing holds and how long each field may be (AGL-2910):\n// the SEO editors and anything that proposes a value read one catalog.\nexport * from './seo-listing-fields'\n// `VideoObject` for the Video elements a page actually ships (AGL-2747).\n// Beside the other structured-data builders, and server-only like them: only\n// the route emits JSON-LD, and a crawler-facing block has no client caller.\nexport * from './video-object'\n// `FAQPage` for the FAQ section a page draws (AGL-3574): the same input, the\n// same reason, and server-only for the same one — only the route emits it.\nexport * from './faq-page'\nexport * from './collection-delete'\nexport * from './collection-entries'\nexport * from './collection-kind'\nexport * from './collection-slug'\nexport * from './content-authors'\n// NOT re-exported: `./local-business` and `./site-entity-json-ld` (AGL-3383).\n// This barrel is the whole namespace a realm bundle is handed and part of the\n// runtime a published page loads (`check:tenant-wire-weight`); the site\n// entity's JSON-LD and the LocalBusiness allow-list are read only by the\n// tenant page's server render and the console's Setup → SEO card, which import\n// them by path (`@aglyn/aglyn/app-utils/...`).\nexport * from './content-query-fields'\nexport * from './content-schema-type'\nexport * from './content-author-profile'\nexport * from './url-slug'\nexport * from './child-contract'\nexport * from './child-contract-compose'\n// The one reading of `restrictChildren`/`restrictParent`, shared by the\n// besigner's drop check and the AI plugin's node-tree validator (AGL-2905).\nexport * from './lineal-order'\n// What a portable node tree must satisfy before it lands on a canvas that did\n// not author it (AGL-2939): a tree installed from another workspace and a tree\n// a model generated both pass through it.\nexport * from './node-definition-sanitizer'\nexport * from './console-routes'\n// What a stored screen-link value means, with no React attached — the\n// where-used scan reads these on the server (AGL-703).\nexport * from './screen-link-value'\n// Which entries a page's links name (AGL-3118). The tenant render reads\n// exactly those entry documents, so the walk runs on the server.\nexport * from './link-references'\nexport * from './analytics-path-key'\nexport * from './contacts'\n// A lead's or a contact's email state (AGL-3245): the last verdict on its\n// address, in words a person can act on, mirrored from the senders' lists.\nexport * from './email-state'\n// A field whose choices an admin keeps (AGL-3510): standard values built in,\n// the organization's own beside them, and the judge every write asks. Pure,\n// and named for no plugin — a plugin's registry of picklists sits on top.\nexport * from './picklists'\n// The records that sit beside a contact — companies, pipelines, deals, tasks,\n// activities, field definitions (AGL-2595). Pure like `contacts`, and beside\n// it because `ContactFacet` names its lifecycle stage and custom-value types;\n// the scope stamp every CRM creator writes lives here too.\nexport * from './crm'\n// Email templates, snippets and the merge-field resolver (AGL-2658): the\n// letter a rep keeps under a name, and the one grammar the send route and\n// the dialog fill it in by. Pure like `crm`, and beside it because a\n// template is scoped the way a task is.\nexport * from './crm-email-templates'\n// A person's privacy erasure from one workspace (AGL-2623): the request's\n// shape and id, the marker a record carries while it waits, and the lists\n// the dialog and the docs share. Pure like `crm`; the sweep is server-side.\nexport * from './person-erasure'\n// A task's reminder at its own time (AGL-2659): which reminder a save\n// leaves, whether one is owed, and the words the notification and the mail\n// say. Pure like `crm`, read by the hourly route and by every writer of the\n// field.\n// Reading a received email (AGL-2657): the address in a header, the thread\n// a subject belongs to, the reply above the quoted history — and the domain\n// the platform receives mail on. Pure; every surface that reads mail it was\n// sent reads it this way.\nexport * from './email-text'\nexport * from './inbound-mail-domain'\n// A member's own addresses in a workspace (AGL-2975): the ones they have\n// confirmed count as theirs wherever the roster is asked who wrote a\n// message. Pure; the store and the confirmation link are server-side.\nexport * from './member-email-aliases'\n// The CSV cell grammar the exports write with (AGL-2621), and the target a\n// mapped column names for a custom field — named rather than starred, because\n// an importer built on this file exports the shared ceilings under its own\n// names.\nexport {\n csvCell,\n csvDocument,\n customImportTarget,\n customImportTargetKey,\n importNoMailServerSentence,\n} from './csv-import'\nexport type {\n ImportChunkResult,\n ImportDroppedValue,\n ImportSkippedRow,\n} from './csv-import'\n// What a VALUE under a custom contact field may be, and the coercion every\n// door applies to one (AGL-2601): a mapped form field, an API `custom` body,\n// and the carry-over that keeps a mapping across a publish. Pure like `crm`.\nexport * from './contact-custom-fields'\n// The consent JOIN (`docs/specs/email-overhaul.md` §3f). Pure, and it composes\n// `contacts` for the normalizer, so it sits directly beside it. No Node\n// builtin, which is what keeps it out of the `/server`-only group `person-key`\n// belongs to.\nexport * from './consent-groups'\nexport * from './marketing-consent'\n// A refusal kept after the record it was written on is deleted (AGL-3338),\n// read back through the same parser as the record's own.\nexport * from './retained-refusals'\n// The ENROLLMENT-time half of the same question, beside its reader for the\n// same reason: `marketing-consent` decides whether a recorded basis lets us\n// mail somebody, and this decides what basis putting them on a list may\n// record. Two enrollment surfaces import it — the Inbox assignment route and\n// the Emails console's audience card — and neither could import the other.\nexport * from './enrollment-basis'\n// Reading the FILE a merchant arrives with (`docs/specs/email-competitive-gaps.md`\n// G5/P4), directly after the policy it hands its addresses to: parsing and\n// mechanical screening only, so that an import asks the enrollment question\n// through the same module the one-address add path asks it through rather\n// than answering it a second way.\n// The dynamic-list rule (§3b/§3c), beside it for the same reasons: pure, and\n// it composes `contacts` for the segment vocabulary rather than restating it.\nexport * from './dynamic-list-rule'\n// The subscribable streams a recipient can leave one at a time\n// (`docs/specs/email-competitive-gaps.md` §1f). Pure, and read from all three\n// sides of the feature: the composer picks one, the send path signs it into\n// the unsubscribe link, and the unauthenticated preference page renders the\n// catalog. No Node builtin, so it stays out of the `/server`-only group.\nexport * from './subscription-topics'\nexport * from './compose-layout-nodes'\n// Layout properties applied through the chain (AGL-2893).\nexport * from './compose-layout-props'\n// A screen's per-page restyling of its layout's elements (AGL-3286).\nexport * from './layout-style-overrides'\nexport * from './document-landmark'\nexport * from './functions'\nexport * from './compose-reusable-components'\n// Where a reusable component is placed — pages or emails (AGL-3287).\nexport * from './reusable-component-kind'\nexport * from './compress'\nexport * from './merge-node-sx'\nexport * from './palette-sx'\nexport * from './scheme-sx'\n// An element pinned to one color scheme (AGL-3284).\nexport * from './element-color-scheme'\nexport * from './create-resource-uid'\nexport * from './decompress'\nexport * from './stored-nodes'\nexport * from './strip-undefined'\nexport * from './organizations'\nexport * from './org-permissions'\n// The AI verdict on either membership axis (AGL-2927). After both modules it\n// composes: the org catalog for org-wide members, the host role for site\n// collaborators.\nexport * from './host-permissions'\nexport * from './password-policy'\nexport * from './idp-profile'\nexport * from './onboarding-deep-link'\n// The platform team's ask that a workspace buy a plan (AGL-3466), beside the\n// plan intent its button carries into Billing.\nexport * from './upgrade-proposal'\n// Where an account came from (AGL-1731). Beside the plan intent because\n// they are the same hop — the marketing CTA's query string — and both are\n// remembered on `users/{uid}` across the verification wall.\nexport * from './utm-attribution'\n// What a record is filed under: the edge between a container a plugin keeps\n// (a campaign) and the forms, screens and contacts it gathers. Beside the\n// attribution above because the two answer opposite questions: attribution\n// records where somebody CAME from, this records what a merchant DECLARED\n// belongs together.\nexport * from './container-membership'\nexport * from './deployment-shape'\n// Which browser origins may complete a signed direct-to-GCS upload (AGL-1452).\n// GCS matches the origin list EXACTLY, so every serving console name needs its\n// own entry — the rule nobody could be expected to remember at attach time.\nexport * from './upload-cors'\n// The docs-help subset the first-party plugin consoles read (AGL-2213) — the\n// console's own registry lives in apps/console/constants and a lib cannot\n// import an app.\nexport * from './docs-help'\nexport * from './platform-brand'\nexport * from './plan-entitlements'\n// The free plan's bandwidth hard cap (AGL-1967/2070/2155). After\n// `plan-entitlements`, which owns the predicate it keys off.\nexport * from './bandwidth-cap'\n// Video and file delivery as bandwidth (AGL-3474), in the band's own units.\nexport * from './media-bandwidth'\n// The month every monthly counter is keyed by, and the boundary it lifts on.\nexport * from './utc-month'\nexport * from './forms'\n// What a form's DESIGN must still satisfy for its submissions to arrive.\n// After `forms`, whose field walk it reads the drawn fields with.\nexport * from './form-contract'\nexport * from './visitor-record-ceiling'\nexport * from './health-report'\n// Did a webhook delivery actually DO anything (AGL-1954)? After\n// `health-report`, whose billing verdict consumes the counts this produces.\nexport * from './webhook-delivery'\nexport * from './support-tiers'\n// Site Care requests (AGL-3959): the arithmetic, and the two modules any\n// staff-recorded, approval-gated charge reuses (AGL-3970).\nexport * from './site-care'\nexport * from './owner-approval-record'\nexport * from './append-only-history'\n// Site Care projects (AGL-3970): the flat quote, its split and its record.\nexport * from './site-care-project'\nexport * from './release-flags'\n// Who runs THIS deployment, and where its notices go (AGL-2016). Ordered\n// before the four surfaces that print it, all of which used to declare their\n// own `support@aglyn.com` literal.\nexport * from './operator-identity'\nexport * from './lockdown'\nexport * from './media-quarantine'\nexport * from './media-takedown-reach'\nexport * from './upload-inspection'\nexport * from './abuse-report'\n// The other three quarters of §512 (AGL-1983): the put-back procedure that\n// answers a notice, and the strike ledger that conditions the safe harbour.\nexport * from './dmca-counter-notice'\nexport * from './repeat-infringer'\n// `addBusinessDays` briefly existed TWICE — once here in './support-tiers'\n// and once in './dmca-counter-notice' — and two `export *` made the name\n// ambiguous, TS2308'ing this barrel and every tsconfig that reads it. The\n// interleave was fixed twice in parallel: once by naming a winner here, and\n// once by deleting the second definition so './dmca-counter-notice' imports\n// this one. Only the deletion survives, so the disambiguating re-export that\n// stood on this line is gone with it — `export *` is unambiguous again.\n//\n// The concern that argued for keeping two copies is worth answering rather\n// than dropping: a later tweak to the SUPPORT SLA window must never silently\n// move the §512(g)(2)(C) put-back deadline. It cannot. This function embeds\n// no window — it is \"add N business days\", and N is the argument. The two\n// windows live in their own constants (`SUPPORT_*` there,\n// `COUNTER_NOTICE_*_BUSINESS_DAYS` in the DMCA module) and never meet. What\n// SHOULD stay shared is the day arithmetic itself: two copies of a weekend\n// rule are two chances to disagree about which day a deadline falls on.\nexport * from './org-override-reason'\nexport * from './host-tokens'\nexport * from './variables'\n// What happened on a site that an automation can start on: the platform's\n// own event and the ones plugins declare (AGL-3080).\nexport * from './host-events'\nexport * from './expand-repeatables'\nexport * from './org-roles'\nexport * from './markdown-lite'\nexport * from './notifications'\n// The operator alert registry (AGL-3377); OPERATOR_ALERT_NOTIFICATION_TYPES\n// lives here now, derived from it.\nexport * from './operator-alerts'\nexport * from './definition-canvas-tree'\nexport * from './ensure-canvas-root'\nexport * from './repair-canvas-nodes'\nexport * from './detect-template-placeholders'\nexport * from './guarded-version-save'\nexport * from './version-draft'\nexport * from './local-storage-budget'\nexport * from './measure-node-map'\nexport * from './resolve-named-tokens'\nexport * from './screen-route'\nexport * from './host-naming'\nexport * from './name-search'\nexport * from './artifact-list-keys'\nexport * from './name-match'\nexport * from './api-plugins'\nexport * from './plugin-api-rate-limit'\n// The same-origin gate on visitor-facing plugin writes (AGL-1880). After\n// `plugin-api-rate-limit`, whose `isMachinePluginApiPath` it reuses so the\n// two gates exempt exactly the same machine surfaces.\nexport * from './plugin-api-cross-origin'\n// What a published page does when a visitor does something (AGL-3080): the\n// platform's interaction vocabulary, which the workflows plugin builds its\n// automations on.\nexport * from './site-interactions'\nexport * from './element-animation'\nexport * from './attribution-guard'\nexport * from './node-interactions'\nexport * from './element-ui'\nexport * from './image-upload-types'\nexport * from './sanitize-svg'\nexport * from './media-folders'\nexport * from './media-metadata'\nexport * from './media-ref'\nexport * from './rendered-widths'\n// After `media-ref`, whose reference grammar it reads stored URLs with.\nexport * from './paid-media-source'\nexport * from './author-css'\n// The isomorphic HTML rule (AGL-1901), after the CSS one it depends on.\nexport * from './author-html'\nexport * from './csv'\nexport * from './csv-upload'\nexport * from './artifact-provenance'\nexport * from './repeat-query'\nexport * from './plugin-manifest'\n// After `plugin-manifest`, whose revocation predicates it asks the kill\n// question with, and after `media-ref`, whose grammar decides what counts as a\n// first-party image.\nexport * from './email-starter-policy'\nexport * from './safe-json-ld'\n// Agent readiness (AGL-2716): content negotiation, the Markdown rendering of a\n// page, `/llms.txt` and the per-site OpenAPI document. All pure, all server-safe.\nexport * from './accept-negotiation'\nexport * from './agent-api-catalog'\nexport * from './agent-openapi'\nexport * from './author-html-markdown'\nexport * from './llms-txt'\nexport * from './page-markdown'\nexport * from './request-geo'\nexport * from './request-ip'\nexport * from './search-indexing'\n// Preview: a site or page only its team can see (AGL-4086).\nexport * from './site-preview'\nexport * from './seo-title'\nexport * from './sitemap'\nexport * from './visitor-consent'\nexport * from './social-image'\nexport * from './scope-tokens'\nexport * from './org-billing-doc'\nexport * from './stripe-deployment-mode'\nexport * from './deferred-image'\n"],"names":["csvCell","csvDocument","customImportTarget","customImportTargetKey","importNoMailServerSentence"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;CAMC,GACD,cAAc,6BAAyB;AACvC,cAAc,sBAAkB;AAChC,cAAc,0BAAsB;AACpC,yEAAyE;AACzE,uEAAuE;AACvE,cAAc,0BAAsB;AACpC,yEAAyE;AACzE,6EAA6E;AAC7E,4EAA4E;AAC5E,cAAc,oBAAgB;AAC9B,6EAA6E;AAC7E,2EAA2E;AAC3E,cAAc,gBAAY;AAC1B,cAAc,yBAAqB;AACnC,cAAc,0BAAsB;AACpC,cAAc,uBAAmB;AACjC,cAAc,uBAAmB;AACjC,cAAc,uBAAmB;AACjC,8EAA8E;AAC9E,8EAA8E;AAC9E,wEAAwE;AACxE,yEAAyE;AACzE,+EAA+E;AAC/E,+CAA+C;AAC/C,cAAc,4BAAwB;AACtC,cAAc,2BAAuB;AACrC,cAAc,8BAA0B;AACxC,cAAc,gBAAY;AAC1B,cAAc,sBAAkB;AAChC,cAAc,8BAA0B;AACxC,wEAAwE;AACxE,4EAA4E;AAC5E,cAAc,oBAAgB;AAC9B,8EAA8E;AAC9E,+EAA+E;AAC/E,0CAA0C;AAC1C,cAAc,iCAA6B;AAC3C,cAAc,sBAAkB;AAChC,sEAAsE;AACtE,uDAAuD;AACvD,cAAc,yBAAqB;AACnC,wEAAwE;AACxE,iEAAiE;AACjE,cAAc,uBAAmB;AACjC,cAAc,0BAAsB;AACpC,cAAc,gBAAY;AAC1B,0EAA0E;AAC1E,2EAA2E;AAC3E,cAAc,mBAAe;AAC7B,6EAA6E;AAC7E,4EAA4E;AAC5E,0EAA0E;AAC1E,cAAc,iBAAa;AAC3B,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,2DAA2D;AAC3D,cAAc,WAAO;AACrB,yEAAyE;AACzE,0EAA0E;AAC1E,qEAAqE;AACrE,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BAAc;AAC5B,cAAc,0BAAsB;AACpC,cAAc,oBAAgB;AAC9B,cAAc,qBAAiB;AAC/B,cAAc,sBAAkB;AAChC,cAAc,iBAAa;AAC3B,cAAc,uBAAmB;AACjC,wEAAwE;AACxE,cAAc,yBAAqB;AACnC,cAAc,kBAAc;AAC5B,wEAAwE;AACxE,cAAc,mBAAe;AAC7B,cAAc,WAAO;AACrB,cAAc,kBAAc;AAC5B,cAAc,2BAAuB;AACrC,cAAc,oBAAgB;AAC9B,cAAc,uBAAmB;AACjC,wEAAwE;AACxE,+EAA+E;AAC/E,qBAAqB;AACrB,cAAc,4BAAwB;AACtC,cAAc,oBAAgB;AAC9B,+EAA+E;AAC/E,kFAAkF;AAClF,cAAc,0BAAsB;AACpC,cAAc,yBAAqB;AACnC,cAAc,qBAAiB;AAC/B,cAAc,4BAAwB;AACtC,cAAc,gBAAY;AAC1B,cAAc,qBAAiB;AAC/B,cAAc,mBAAe;AAC7B,cAAc,kBAAc;AAC5B,cAAc,uBAAmB;AACjC,4DAA4D;AAC5D,cAAc,oBAAgB;AAC9B,cAAc,iBAAa;AAC3B,cAAc,eAAW;AACzB,cAAc,uBAAmB;AACjC,cAAc,oBAAgB;AAC9B,cAAc,oBAAgB;AAC9B,cAAc,uBAAmB;AACjC,cAAc,8BAA0B;AACxC,cAAc,sBAAkB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The query a sites page opens "Create site" from, and the way back to it
|
|
19
|
+
* after buying a starter (AGL-3761, AGL-4049).
|
|
20
|
+
*
|
|
21
|
+
* `/{org}/hosts?create=site` opens Create site: the empty console sends a
|
|
22
|
+
* first site there once its workspace exists. A starter bought from "Choose
|
|
23
|
+
* your starter" comes back the same way, naming the starter the person picked
|
|
24
|
+
* (`&starter={listingId}`) and how the payment ended (`&purchase=success` or
|
|
25
|
+
* `&purchase=canceled`), so Create site reopens on that pick. The server
|
|
26
|
+
* that opens the payment builds the address from these names, and the sites
|
|
27
|
+
* page reads it with them, so the two cannot disagree.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SITE_CREATE_PARAM = "create";
|
|
30
|
+
export declare const SITE_CREATE_VALUE = "site";
|
|
31
|
+
/** The starter the person picked before paying for it. */
|
|
32
|
+
export declare const SITE_CREATE_STARTER_PARAM = "starter";
|
|
33
|
+
/** How the payment ended, as the payment page sends the person back. */
|
|
34
|
+
export declare const SITE_CREATE_PURCHASE_PARAM = "purchase";
|
|
35
|
+
export type SiteCreatePurchase = 'success' | 'canceled';
|
|
36
|
+
/** A starter Create site reopens on: the person's own pick, and how buying it ended. */
|
|
37
|
+
export interface SiteCreateStarterReturn {
|
|
38
|
+
listingId: string;
|
|
39
|
+
/** `success` once paid, `canceled` when the person came back without paying, `null` when it does not say. */
|
|
40
|
+
purchase: SiteCreatePurchase | null;
|
|
41
|
+
}
|
|
42
|
+
/** What a sites page's address asks of Create site. */
|
|
43
|
+
export interface SiteCreateRequest {
|
|
44
|
+
/** `?create=site` is present. */
|
|
45
|
+
asked: boolean;
|
|
46
|
+
/** The starter to reopen on, or `null`. */
|
|
47
|
+
starter: SiteCreateStarterReturn | null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The query that reopens Create site on a starter, in one order, for the
|
|
51
|
+
* payment's way back: `create=site&starter={listingId}`, and `purchase` when
|
|
52
|
+
* it is given. `null` for an id no listing can have, so a malformed one is
|
|
53
|
+
* never written into an address.
|
|
54
|
+
*/
|
|
55
|
+
export declare function siteCreateReturnQuery(listingId: string, purchase?: SiteCreatePurchase): URLSearchParams | null;
|
|
56
|
+
/**
|
|
57
|
+
* What an address asks of Create site, read defensively. A starter is read
|
|
58
|
+
* only with `create=site`, and only a well-formed listing id; a `purchase`
|
|
59
|
+
* value other than the two the payment sends is no answer at all.
|
|
60
|
+
*/
|
|
61
|
+
export declare function readSiteCreateRequest(params: {
|
|
62
|
+
get(name: string): string | null;
|
|
63
|
+
} | null | undefined): SiteCreateRequest;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ /**
|
|
17
|
+
* The query a sites page opens "Create site" from, and the way back to it
|
|
18
|
+
* after buying a starter (AGL-3761, AGL-4049).
|
|
19
|
+
*
|
|
20
|
+
* `/{org}/hosts?create=site` opens Create site: the empty console sends a
|
|
21
|
+
* first site there once its workspace exists. A starter bought from "Choose
|
|
22
|
+
* your starter" comes back the same way, naming the starter the person picked
|
|
23
|
+
* (`&starter={listingId}`) and how the payment ended (`&purchase=success` or
|
|
24
|
+
* `&purchase=canceled`), so Create site reopens on that pick. The server
|
|
25
|
+
* that opens the payment builds the address from these names, and the sites
|
|
26
|
+
* page reads it with them, so the two cannot disagree.
|
|
27
|
+
*/ export const SITE_CREATE_PARAM = 'create';
|
|
28
|
+
export const SITE_CREATE_VALUE = 'site';
|
|
29
|
+
/** The starter the person picked before paying for it. */ export const SITE_CREATE_STARTER_PARAM = 'starter';
|
|
30
|
+
/** How the payment ended, as the payment page sends the person back. */ export const SITE_CREATE_PURCHASE_PARAM = 'purchase';
|
|
31
|
+
/** A listing id as an address may carry one: the marketplace's own id shape. */ const LISTING_ID = /^[A-Za-z0-9_-]{1,128}$/;
|
|
32
|
+
/**
|
|
33
|
+
* The query that reopens Create site on a starter, in one order, for the
|
|
34
|
+
* payment's way back: `create=site&starter={listingId}`, and `purchase` when
|
|
35
|
+
* it is given. `null` for an id no listing can have, so a malformed one is
|
|
36
|
+
* never written into an address.
|
|
37
|
+
*/ export function siteCreateReturnQuery(listingId, purchase) {
|
|
38
|
+
const id = typeof listingId === 'string' ? listingId.trim() : '';
|
|
39
|
+
if (!LISTING_ID.test(id)) return null;
|
|
40
|
+
const params = new URLSearchParams();
|
|
41
|
+
params.set(SITE_CREATE_PARAM, SITE_CREATE_VALUE);
|
|
42
|
+
params.set(SITE_CREATE_STARTER_PARAM, id);
|
|
43
|
+
if (purchase) params.set(SITE_CREATE_PURCHASE_PARAM, purchase);
|
|
44
|
+
return params;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* What an address asks of Create site, read defensively. A starter is read
|
|
48
|
+
* only with `create=site`, and only a well-formed listing id; a `purchase`
|
|
49
|
+
* value other than the two the payment sends is no answer at all.
|
|
50
|
+
*/ export function readSiteCreateRequest(params) {
|
|
51
|
+
var _ref;
|
|
52
|
+
const asked = (params == null ? void 0 : params.get(SITE_CREATE_PARAM)) === SITE_CREATE_VALUE;
|
|
53
|
+
if (!asked) return {
|
|
54
|
+
asked: false,
|
|
55
|
+
starter: null
|
|
56
|
+
};
|
|
57
|
+
const listingId = ((_ref = params == null ? void 0 : params.get(SITE_CREATE_STARTER_PARAM)) != null ? _ref : '').trim();
|
|
58
|
+
if (!LISTING_ID.test(listingId)) return {
|
|
59
|
+
asked: true,
|
|
60
|
+
starter: null
|
|
61
|
+
};
|
|
62
|
+
const purchase = params == null ? void 0 : params.get(SITE_CREATE_PURCHASE_PARAM);
|
|
63
|
+
return {
|
|
64
|
+
asked: true,
|
|
65
|
+
starter: {
|
|
66
|
+
listingId,
|
|
67
|
+
purchase: purchase === 'success' || purchase === 'canceled' ? purchase : null
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=site-create-return.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/site-create-return.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\n/**\n * The query a sites page opens \"Create site\" from, and the way back to it\n * after buying a starter (AGL-3761, AGL-4049).\n *\n * `/{org}/hosts?create=site` opens Create site: the empty console sends a\n * first site there once its workspace exists. A starter bought from \"Choose\n * your starter\" comes back the same way, naming the starter the person picked\n * (`&starter={listingId}`) and how the payment ended (`&purchase=success` or\n * `&purchase=canceled`), so Create site reopens on that pick. The server\n * that opens the payment builds the address from these names, and the sites\n * page reads it with them, so the two cannot disagree.\n */\n\nexport const SITE_CREATE_PARAM = 'create'\nexport const SITE_CREATE_VALUE = 'site'\n/** The starter the person picked before paying for it. */\nexport const SITE_CREATE_STARTER_PARAM = 'starter'\n/** How the payment ended, as the payment page sends the person back. */\nexport const SITE_CREATE_PURCHASE_PARAM = 'purchase'\n\nexport type SiteCreatePurchase = 'success' | 'canceled'\n\n/** A starter Create site reopens on: the person's own pick, and how buying it ended. */\nexport interface SiteCreateStarterReturn {\n listingId: string\n /** `success` once paid, `canceled` when the person came back without paying, `null` when it does not say. */\n purchase: SiteCreatePurchase | null\n}\n\n/** What a sites page's address asks of Create site. */\nexport interface SiteCreateRequest {\n /** `?create=site` is present. */\n asked: boolean\n /** The starter to reopen on, or `null`. */\n starter: SiteCreateStarterReturn | null\n}\n\n/** A listing id as an address may carry one: the marketplace's own id shape. */\nconst LISTING_ID = /^[A-Za-z0-9_-]{1,128}$/\n\n/**\n * The query that reopens Create site on a starter, in one order, for the\n * payment's way back: `create=site&starter={listingId}`, and `purchase` when\n * it is given. `null` for an id no listing can have, so a malformed one is\n * never written into an address.\n */\nexport function siteCreateReturnQuery(\n listingId: string,\n purchase?: SiteCreatePurchase,\n): URLSearchParams | null {\n const id = typeof listingId === 'string' ? listingId.trim() : ''\n if (!LISTING_ID.test(id)) return null\n const params = new URLSearchParams()\n params.set(SITE_CREATE_PARAM, SITE_CREATE_VALUE)\n params.set(SITE_CREATE_STARTER_PARAM, id)\n if (purchase) params.set(SITE_CREATE_PURCHASE_PARAM, purchase)\n return params\n}\n\n/**\n * What an address asks of Create site, read defensively. A starter is read\n * only with `create=site`, and only a well-formed listing id; a `purchase`\n * value other than the two the payment sends is no answer at all.\n */\nexport function readSiteCreateRequest(\n params: { get(name: string): string | null } | null | undefined,\n): SiteCreateRequest {\n const asked = params?.get(SITE_CREATE_PARAM) === SITE_CREATE_VALUE\n if (!asked) return { asked: false, starter: null }\n const listingId = (params?.get(SITE_CREATE_STARTER_PARAM) ?? '').trim()\n if (!LISTING_ID.test(listingId)) return { asked: true, starter: null }\n const purchase = params?.get(SITE_CREATE_PURCHASE_PARAM)\n return {\n asked: true,\n starter: {\n listingId,\n purchase: purchase === 'success' || purchase === 'canceled' ? purchase : null,\n },\n }\n}\n"],"names":["SITE_CREATE_PARAM","SITE_CREATE_VALUE","SITE_CREATE_STARTER_PARAM","SITE_CREATE_PURCHASE_PARAM","LISTING_ID","siteCreateReturnQuery","listingId","purchase","id","trim","test","params","URLSearchParams","set","readSiteCreateRequest","asked","get","starter"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;CAWC,GAED,OAAO,MAAMA,oBAAoB,SAAQ;AACzC,OAAO,MAAMC,oBAAoB,OAAM;AACvC,wDAAwD,GACxD,OAAO,MAAMC,4BAA4B,UAAS;AAClD,sEAAsE,GACtE,OAAO,MAAMC,6BAA6B,WAAU;AAmBpD,8EAA8E,GAC9E,MAAMC,aAAa;AAEnB;;;;;CAKC,GACD,OAAO,SAASC,sBACdC,SAAiB,EACjBC,QAA6B;IAE7B,MAAMC,KAAK,OAAOF,cAAc,WAAWA,UAAUG,IAAI,KAAK;IAC9D,IAAI,CAACL,WAAWM,IAAI,CAACF,KAAK,OAAO;IACjC,MAAMG,SAAS,IAAIC;IACnBD,OAAOE,GAAG,CAACb,mBAAmBC;IAC9BU,OAAOE,GAAG,CAACX,2BAA2BM;IACtC,IAAID,UAAUI,OAAOE,GAAG,CAACV,4BAA4BI;IACrD,OAAOI;AACT;AAEA;;;;CAIC,GACD,OAAO,SAASG,sBACdH,MAA+D;;IAE/D,MAAMI,QAAQJ,CAAAA,0BAAAA,OAAQK,GAAG,CAAChB,wBAAuBC;IACjD,IAAI,CAACc,OAAO,OAAO;QAAEA,OAAO;QAAOE,SAAS;IAAK;IACjD,MAAMX,YAAY,SAACK,0BAAAA,OAAQK,GAAG,CAACd,6CAA8B,IAAIO,IAAI;IACrE,IAAI,CAACL,WAAWM,IAAI,CAACJ,YAAY,OAAO;QAAES,OAAO;QAAME,SAAS;IAAK;IACrE,MAAMV,WAAWI,0BAAAA,OAAQK,GAAG,CAACb;IAC7B,OAAO;QACLY,OAAO;QACPE,SAAS;YACPX;YACAC,UAAUA,aAAa,aAAaA,aAAa,aAAaA,WAAW;QAC3E;IACF;AACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type { SiteStarterSummary } from '../plugin-manager/plugin-site-starters';
|
|
18
|
+
/**
|
|
19
|
+
* A starter picked in "Choose your starter" (AGL-4049), as Create site
|
|
20
|
+
* decides about it: whether a site can be created from it yet, and what the
|
|
21
|
+
* create's refusal of it asks for. Pure, so every surface that offers the
|
|
22
|
+
* picker — the console, the native apps — decides the same way.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* What stands between a pick and Create site: nothing picked (`none`), or a
|
|
26
|
+
* price the workspace has not paid (`purchase`); `null` when the site can be
|
|
27
|
+
* created from it. `owned` is what the surface knows better than the
|
|
28
|
+
* search's own answer (the person just paid, or the create still asked for
|
|
29
|
+
* payment); absent, the summary's `owned` stands.
|
|
30
|
+
*/
|
|
31
|
+
export type SiteStarterPickBlock = 'none' | 'purchase';
|
|
32
|
+
export declare function siteStarterPickBlock(pick: SiteStarterSummary | null | undefined, owned?: boolean): SiteStarterPickBlock | null;
|
|
33
|
+
/** What Create site does with a create that refused the starter it was asked for. */
|
|
34
|
+
export interface SiteStarterPickRefused {
|
|
35
|
+
/** The pick stays: it can still be created from, once bought. */
|
|
36
|
+
keep: boolean;
|
|
37
|
+
/** It is the price that stands in the way, so buying it is offered. */
|
|
38
|
+
purchase: boolean;
|
|
39
|
+
/** The create's own words for why. */
|
|
40
|
+
message: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The create's refusal of THIS pick, or `null` for a refusal about anything
|
|
44
|
+
* else (the name, the address, the plan's site count), which Create site
|
|
45
|
+
* answers as it always has. A refusal of a pick names its listing: a 402 is
|
|
46
|
+
* a price to pay, and the pick stays with "Buy and continue"; anything else
|
|
47
|
+
* (the release not open to the workspace, a starter that is gone, one with
|
|
48
|
+
* more pages than the plan holds, an AI starter before the AI start takes
|
|
49
|
+
* them) clears the pick, with the reason said.
|
|
50
|
+
*/
|
|
51
|
+
export declare function readSiteStarterPickRefusal(status: number, payload: unknown, listingId: string): SiteStarterPickRefused | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ export function siteStarterPickBlock(pick, owned) {
|
|
17
|
+
if (!pick) return 'none';
|
|
18
|
+
if (pick.priceUsd > 0 && !(owned != null ? owned : pick.owned === true)) return 'purchase';
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The create's refusal of THIS pick, or `null` for a refusal about anything
|
|
23
|
+
* else (the name, the address, the plan's site count), which Create site
|
|
24
|
+
* answers as it always has. A refusal of a pick names its listing: a 402 is
|
|
25
|
+
* a price to pay, and the pick stays with "Buy and continue"; anything else
|
|
26
|
+
* (the release not open to the workspace, a starter that is gone, one with
|
|
27
|
+
* more pages than the plan holds, an AI starter before the AI start takes
|
|
28
|
+
* them) clears the pick, with the reason said.
|
|
29
|
+
*/ export function readSiteStarterPickRefusal(status, payload, listingId) {
|
|
30
|
+
if (!payload || typeof payload !== 'object' || Array.isArray(payload)) return null;
|
|
31
|
+
const body = payload;
|
|
32
|
+
if (!listingId || body['listingId'] !== listingId) return null;
|
|
33
|
+
const error = body['error'];
|
|
34
|
+
const message = typeof error === 'string' && error.trim() ? error.trim() : 'That starter cannot be used.';
|
|
35
|
+
if (status === 402) return {
|
|
36
|
+
keep: true,
|
|
37
|
+
purchase: true,
|
|
38
|
+
message
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
keep: false,
|
|
42
|
+
purchase: false,
|
|
43
|
+
message
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=site-starter-pick.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/site-starter-pick.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 type { SiteStarterSummary } from '../plugin-manager/plugin-site-starters'\n\n/**\n * A starter picked in \"Choose your starter\" (AGL-4049), as Create site\n * decides about it: whether a site can be created from it yet, and what the\n * create's refusal of it asks for. Pure, so every surface that offers the\n * picker — the console, the native apps — decides the same way.\n */\n\n/**\n * What stands between a pick and Create site: nothing picked (`none`), or a\n * price the workspace has not paid (`purchase`); `null` when the site can be\n * created from it. `owned` is what the surface knows better than the\n * search's own answer (the person just paid, or the create still asked for\n * payment); absent, the summary's `owned` stands.\n */\nexport type SiteStarterPickBlock = 'none' | 'purchase'\n\nexport function siteStarterPickBlock(\n pick: SiteStarterSummary | null | undefined,\n owned?: boolean,\n): SiteStarterPickBlock | null {\n if (!pick) return 'none'\n if (pick.priceUsd > 0 && !(owned ?? pick.owned === true)) return 'purchase'\n return null\n}\n\n/** What Create site does with a create that refused the starter it was asked for. */\nexport interface SiteStarterPickRefused {\n /** The pick stays: it can still be created from, once bought. */\n keep: boolean\n /** It is the price that stands in the way, so buying it is offered. */\n purchase: boolean\n /** The create's own words for why. */\n message: string\n}\n\n/**\n * The create's refusal of THIS pick, or `null` for a refusal about anything\n * else (the name, the address, the plan's site count), which Create site\n * answers as it always has. A refusal of a pick names its listing: a 402 is\n * a price to pay, and the pick stays with \"Buy and continue\"; anything else\n * (the release not open to the workspace, a starter that is gone, one with\n * more pages than the plan holds, an AI starter before the AI start takes\n * them) clears the pick, with the reason said.\n */\nexport function readSiteStarterPickRefusal(\n status: number,\n payload: unknown,\n listingId: string,\n): SiteStarterPickRefused | null {\n if (!payload || typeof payload !== 'object' || Array.isArray(payload)) return null\n const body = payload as Record<string, unknown>\n if (!listingId || body['listingId'] !== listingId) return null\n const error = body['error']\n const message = typeof error === 'string' && error.trim() ? error.trim() : 'That starter cannot be used.'\n if (status === 402) return { keep: true, purchase: true, message }\n return { keep: false, purchase: false, message }\n}\n"],"names":["siteStarterPickBlock","pick","owned","priceUsd","readSiteStarterPickRefusal","status","payload","listingId","Array","isArray","body","error","message","trim","keep","purchase"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAoBD,OAAO,SAASA,qBACdC,IAA2C,EAC3CC,KAAe;IAEf,IAAI,CAACD,MAAM,OAAO;IAClB,IAAIA,KAAKE,QAAQ,GAAG,KAAK,EAAED,gBAAAA,QAASD,KAAKC,KAAK,KAAK,OAAO,OAAO;IACjE,OAAO;AACT;AAYA;;;;;;;;CAQC,GACD,OAAO,SAASE,2BACdC,MAAc,EACdC,OAAgB,EAChBC,SAAiB;IAEjB,IAAI,CAACD,WAAW,OAAOA,YAAY,YAAYE,MAAMC,OAAO,CAACH,UAAU,OAAO;IAC9E,MAAMI,OAAOJ;IACb,IAAI,CAACC,aAAaG,IAAI,CAAC,YAAY,KAAKH,WAAW,OAAO;IAC1D,MAAMI,QAAQD,IAAI,CAAC,QAAQ;IAC3B,MAAME,UAAU,OAAOD,UAAU,YAAYA,MAAME,IAAI,KAAKF,MAAME,IAAI,KAAK;IAC3E,IAAIR,WAAW,KAAK,OAAO;QAAES,MAAM;QAAMC,UAAU;QAAMH;IAAQ;IACjE,OAAO;QAAEE,MAAM;QAAOC,UAAU;QAAOH;IAAQ;AACjD"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The styles a new site can start in (AGL-4049), and the record of which one
|
|
19
|
+
* a site was created with.
|
|
20
|
+
*
|
|
21
|
+
* Nothing in "Create site" is chosen for a person: a site is created only
|
|
22
|
+
* once they have picked a style. A style is a kind of site's look — the same
|
|
23
|
+
* 21 the AI start's Style step offers, each with an example home page as its
|
|
24
|
+
* picture — so the starter site and the AI start speak one vocabulary.
|
|
25
|
+
*
|
|
26
|
+
* This module is the LIST: what a person may choose on any surface, the
|
|
27
|
+
* native apps included (the derived-values generator emits it). The LOOK a
|
|
28
|
+
* style gives a site is the AI plugin's, behind the `core.site-style-looks`
|
|
29
|
+
* seam (`plugin-manager/plugin-site-style-looks.ts`); with no plugin
|
|
30
|
+
* answering, a site still starts in the default theme and the choice is
|
|
31
|
+
* still recorded. The AI plugin's own kinds are held to this list, id for id
|
|
32
|
+
* and in order, by `ai-site-kinds.spec.ts`.
|
|
33
|
+
*
|
|
34
|
+
* Pure data and readers, safe for any surface to import.
|
|
35
|
+
*/
|
|
36
|
+
/** Where the console serves each style's picture: `<dir>/<id>.webp`. */
|
|
37
|
+
export declare const SITE_STYLE_PREVIEW_DIR = "/_static/starter/styles";
|
|
38
|
+
/** The width and height every style picture is drawn at. */
|
|
39
|
+
export declare const SITE_STYLE_PREVIEW_SIZE: {
|
|
40
|
+
readonly width: 800;
|
|
41
|
+
readonly height: 800;
|
|
42
|
+
};
|
|
43
|
+
/** One style a site can start in. */
|
|
44
|
+
export interface SiteStyle {
|
|
45
|
+
/** A persisted identifier: the AI start's kind id, stored on the site. */
|
|
46
|
+
id: string;
|
|
47
|
+
/** The card's title. */
|
|
48
|
+
name: string;
|
|
49
|
+
/** One line under it. */
|
|
50
|
+
blurb: string;
|
|
51
|
+
/** The example home page's picture, as a path on the console's origin. */
|
|
52
|
+
preview: string;
|
|
53
|
+
/** What the picture shows, for a reader who cannot see it. */
|
|
54
|
+
alt: string;
|
|
55
|
+
}
|
|
56
|
+
/** Every style, in the order a person is shown them. */
|
|
57
|
+
export declare const SITE_STYLES: readonly SiteStyle[];
|
|
58
|
+
/**
|
|
59
|
+
* "Pick for me": the AI start's style card that lets the answers decide. It
|
|
60
|
+
* is a card a person CLICKS, never a default, and it exists only where
|
|
61
|
+
* something can pick for them (the AI start); the starter site has no such
|
|
62
|
+
* card, so a site created with the starter always names a real style.
|
|
63
|
+
*/
|
|
64
|
+
export declare const SITE_STYLE_AUTO = "auto";
|
|
65
|
+
/** Whether a value names one of the {@link SITE_STYLES}. */
|
|
66
|
+
export declare function isSiteStyleId(value: unknown): value is string;
|
|
67
|
+
/** The style an id names, or `null`. */
|
|
68
|
+
export declare function siteStyleOf(id: unknown): SiteStyle | null;
|
|
69
|
+
/**
|
|
70
|
+
* How a site was started: the starter site (`starter`), the AI start (`ai`),
|
|
71
|
+
* a site brought in from somewhere else (`import`), or a program through the
|
|
72
|
+
* public API (`api`), which keeps the default and chooses no style.
|
|
73
|
+
*/
|
|
74
|
+
export type HostStarterStart = 'starter' | 'ai' | 'import' | 'api';
|
|
75
|
+
export declare const HOST_STARTER_STARTS: readonly HostStarterStart[];
|
|
76
|
+
/**
|
|
77
|
+
* `hosts/{id}.starterChoice` (AGL-4049): what a site was created with, written
|
|
78
|
+
* by the server in the create's own transaction and never by a client, so
|
|
79
|
+
* which styles people choose can be counted, and a site created and then left
|
|
80
|
+
* alone can be told apart from one that was built on.
|
|
81
|
+
*
|
|
82
|
+
* - `kind`: the style id; {@link SITE_STYLE_AUTO} when the AI start's "Pick
|
|
83
|
+
* for me" was chosen; `null` when none was (the API, a seed);
|
|
84
|
+
* - `listingId` / `version`: the marketplace starter picked, or `null`;
|
|
85
|
+
* - `mode`: `base` copies a starter's pages, `ai` writes them for the business.
|
|
86
|
+
*/
|
|
87
|
+
export interface HostStarterChoice {
|
|
88
|
+
listingId: string | null;
|
|
89
|
+
version: string | null;
|
|
90
|
+
kind: string | null;
|
|
91
|
+
mode: 'base' | 'ai';
|
|
92
|
+
start: HostStarterStart;
|
|
93
|
+
}
|
|
94
|
+
/** A choice with its unset parts filled: no listing, no style, `base`. */
|
|
95
|
+
export declare function hostStarterChoice(input: Partial<HostStarterChoice> & {
|
|
96
|
+
start: HostStarterStart;
|
|
97
|
+
}): HostStarterChoice;
|
|
98
|
+
/** A stored or answered choice, read defensively; `null` when it is not one. */
|
|
99
|
+
export declare function readHostStarterChoice(value: unknown): HostStarterChoice | null;
|
|
100
|
+
/**
|
|
101
|
+
* The `host_created` event's parameters for a site's choice: how it was
|
|
102
|
+
* started (`unknown` when the create's answer did not say), its style
|
|
103
|
+
* (`auto` for "Pick for me", `none` for no style) and the starter listing
|
|
104
|
+
* (`none` for none). Ids only, never a name a person typed.
|
|
105
|
+
*/
|
|
106
|
+
export declare function hostCreatedEventParams(choice: HostStarterChoice | null): {
|
|
107
|
+
start: string;
|
|
108
|
+
starter_kind: string;
|
|
109
|
+
starter_listing: string;
|
|
110
|
+
};
|