@aglyn/aglyn 1.0.0-beta.277 → 1.0.0-beta.282
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/account-preferences.d.ts +146 -11
- package/src/lib/app-utils/account-preferences.js +266 -18
- package/src/lib/app-utils/account-preferences.js.map +1 -1
- package/src/lib/app-utils/activity-presenter.js +2 -26
- package/src/lib/app-utils/activity-presenter.js.map +1 -1
- package/src/lib/app-utils/activity-type-labels.d.ts +18 -0
- package/src/lib/app-utils/activity-type-labels.js +46 -0
- package/src/lib/app-utils/activity-type-labels.js.map +1 -0
- package/src/lib/app-utils/artifact-provenance.d.ts +3 -1
- package/src/lib/app-utils/artifact-provenance.js.map +1 -1
- package/src/lib/app-utils/bundle-intent.d.ts +37 -0
- package/src/lib/app-utils/bundle-intent.js +47 -3
- package/src/lib/app-utils/bundle-intent.js.map +1 -1
- package/src/lib/app-utils/compose-reusable-components.d.ts +17 -1
- package/src/lib/app-utils/compose-reusable-components.js +80 -5
- package/src/lib/app-utils/compose-reusable-components.js.map +1 -1
- package/src/lib/app-utils/docs-help-sections.generated.js +13 -1
- package/src/lib/app-utils/docs-help-sections.generated.js.map +1 -1
- package/src/lib/app-utils/docs-help.generated.d.ts +23 -11
- package/src/lib/app-utils/docs-help.generated.js +64 -7
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +357 -49
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/health-report.d.ts +3 -2
- package/src/lib/app-utils/health-report.js +22 -2
- package/src/lib/app-utils/health-report.js.map +1 -1
- package/src/lib/app-utils/native-nav.d.ts +39 -4
- package/src/lib/app-utils/native-nav.js +69 -3
- package/src/lib/app-utils/native-nav.js.map +1 -1
- package/src/lib/app-utils/native-themes.d.ts +28 -17
- package/src/lib/app-utils/native-themes.js +123 -45
- package/src/lib/app-utils/native-themes.js.map +1 -1
- package/src/lib/app-utils/operator-alerts.js +4 -2
- package/src/lib/app-utils/operator-alerts.js.map +1 -1
- package/src/lib/app-utils/org-permission-editor.d.ts +75 -0
- package/src/lib/app-utils/org-permission-editor.js +124 -0
- package/src/lib/app-utils/org-permission-editor.js.map +1 -0
- package/src/lib/app-utils/org-permissions.d.ts +36 -0
- package/src/lib/app-utils/org-permissions.js +78 -26
- package/src/lib/app-utils/org-permissions.js.map +1 -1
- package/src/lib/app-utils/org-role-grants.d.ts +59 -9
- package/src/lib/app-utils/org-role-grants.js +97 -10
- package/src/lib/app-utils/org-role-grants.js.map +1 -1
- package/src/lib/app-utils/plan-entitlements.d.ts +13 -0
- package/src/lib/app-utils/plan-entitlements.js +22 -0
- package/src/lib/app-utils/plan-entitlements.js.map +1 -1
- package/src/lib/app-utils/release-flags.d.ts +52 -1
- package/src/lib/app-utils/release-flags.js +68 -2
- package/src/lib/app-utils/release-flags.js.map +1 -1
- package/src/lib/app-utils/reusable-component-keys.d.ts +13 -0
- package/src/lib/app-utils/reusable-component-keys.js +12 -0
- package/src/lib/app-utils/reusable-component-keys.js.map +1 -1
- package/src/lib/app-utils/screen-analytics-aggregate.d.ts +34 -0
- package/src/lib/app-utils/screen-analytics-aggregate.js +37 -0
- package/src/lib/app-utils/screen-analytics-aggregate.js.map +1 -1
- package/src/lib/app-utils/site-care.d.ts +35 -0
- package/src/lib/app-utils/site-care.js +48 -0
- package/src/lib/app-utils/site-care.js.map +1 -1
- package/src/lib/app-utils/site-font-pairings.d.ts +59 -0
- package/src/lib/app-utils/site-font-pairings.js +514 -0
- package/src/lib/app-utils/site-font-pairings.js.map +1 -0
- package/src/lib/app-utils/site-starter.d.ts +136 -0
- package/src/lib/app-utils/site-starter.js +116 -0
- package/src/lib/app-utils/site-starter.js.map +1 -0
- package/src/lib/plugin-manager/feature-plugins.d.ts +32 -0
- package/src/lib/plugin-manager/feature-plugins.js +12 -0
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.js +27 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
- package/src/lib/plugin-manager/plugin-entitlements.d.ts +37 -0
- package/src/lib/plugin-manager/plugin-entitlements.js +84 -2
- package/src/lib/plugin-manager/plugin-entitlements.js.map +1 -1
- package/src/lib/plugin-manager/plugin-permissions.d.ts +7 -0
- package/src/lib/plugin-manager/plugin-permissions.js.map +1 -1
- package/src/lib/plugin-manager/plugin-product-catalog.d.ts +12 -0
- package/src/lib/plugin-manager/plugin-product-catalog.js.map +1 -1
- package/src/lib/plugin-manager/plugin-site-starters.d.ts +73 -0
- package/src/lib/plugin-manager/plugin-site-starters.js +30 -0
- package/src/lib/plugin-manager/plugin-site-starters.js.map +1 -0
- package/src/lib/plugin-manager/plugin-sitemap-sections.d.ts +8 -1
- package/src/lib/plugin-manager/plugin-sitemap-sections.js.map +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
*/ import { SCREEN_ROOT_PATH } from "./screen-slug.js";
|
|
17
|
+
/**
|
|
18
|
+
* Site starters (AGL-4049): a whole site a person picks before it exists,
|
|
19
|
+
* every one of them a listing anyone may publish and price, the platform's own
|
|
20
|
+
* included.
|
|
21
|
+
*
|
|
22
|
+
* This module is the vocabulary every reader of a starter shares: the artifact
|
|
23
|
+
* type it is listed under, the facets a search filters on (stamped on the
|
|
24
|
+
* listing as plain fields, so a query can match them), the payload a resolved
|
|
25
|
+
* starter hands the site it creates, and the one check that payload must pass.
|
|
26
|
+
* Who stores starters and how they are bought is the starter source's business
|
|
27
|
+
* (`plugin-manager/plugin-site-starters.ts`); nothing here reads or writes.
|
|
28
|
+
*
|
|
29
|
+
* Pure data and readers, safe for any surface to import.
|
|
30
|
+
*/ /** The artifact type a site starter is listed and installed under (AGL-4049). */ export const SITE_STARTER_ARTIFACT_TYPE = 'siteStarter';
|
|
31
|
+
/**
|
|
32
|
+
* The platform's built-in themes a site's look is layered on (AGL-3497,
|
|
33
|
+
* AGL-4049), by the short name of the themes plugin's preset id
|
|
34
|
+
* (`theme-presets.<name>`), and `starter`: the theme a new site is born with.
|
|
35
|
+
* A starter on a built-in theme names one of these; the AI site start picks
|
|
36
|
+
* among the same list.
|
|
37
|
+
*/ export const SITE_THEME_BASES = [
|
|
38
|
+
'starter',
|
|
39
|
+
'material-ui',
|
|
40
|
+
'bootstrap',
|
|
41
|
+
'minimal',
|
|
42
|
+
'material3',
|
|
43
|
+
'ant-design',
|
|
44
|
+
'fluent',
|
|
45
|
+
'carbon',
|
|
46
|
+
'cupertino'
|
|
47
|
+
];
|
|
48
|
+
/** Whether a value names one of the {@link SITE_THEME_BASES}. */ export function isSiteThemeBase(value) {
|
|
49
|
+
return typeof value === 'string' && SITE_THEME_BASES.includes(value);
|
|
50
|
+
}
|
|
51
|
+
/** The most pages one starter may create. */ export const SITE_STARTER_MAX_SCREENS = 25;
|
|
52
|
+
const isRecord = (value)=>!!value && typeof value === 'object' && !Array.isArray(value);
|
|
53
|
+
const facetString = (value)=>typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
54
|
+
/**
|
|
55
|
+
* A listing's starter facets, read defensively from the fields
|
|
56
|
+
* {@link siteStarterFacetFields} stamps: a missing or malformed field reads as
|
|
57
|
+
* none, a page count as a whole number from zero, and a mode as `base` unless
|
|
58
|
+
* it says `ai`.
|
|
59
|
+
*/ export function siteStarterFacetsOf(doc) {
|
|
60
|
+
const pages = doc['starterPages'];
|
|
61
|
+
return {
|
|
62
|
+
kind: facetString(doc['starterKind']),
|
|
63
|
+
base: facetString(doc['starterBase']),
|
|
64
|
+
fonts: facetString(doc['starterFonts']),
|
|
65
|
+
pages: typeof pages === 'number' && Number.isFinite(pages) && pages > 0 ? Math.floor(pages) : 0,
|
|
66
|
+
mode: doc['starterMode'] === 'ai' ? 'ai' : 'base'
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** The listing fields a starter's publish stamps, the inverse of {@link siteStarterFacetsOf}. */ export function siteStarterFacetFields(facets) {
|
|
70
|
+
return {
|
|
71
|
+
starterKind: facets.kind,
|
|
72
|
+
starterBase: facets.base,
|
|
73
|
+
starterFonts: facets.fonts,
|
|
74
|
+
starterPages: facets.pages,
|
|
75
|
+
starterMode: facets.mode
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const FACET_KEYS = [
|
|
79
|
+
'kind',
|
|
80
|
+
'base',
|
|
81
|
+
'fonts',
|
|
82
|
+
'pages',
|
|
83
|
+
'mode'
|
|
84
|
+
];
|
|
85
|
+
/** Whether a starter's facets meet a filter: every facet the filter names, equal; an absent one, any. */ export function matchSiteStarterFacets(facets, filter) {
|
|
86
|
+
return FACET_KEYS.every((key)=>filter[key] === undefined || facets[key] === filter[key]);
|
|
87
|
+
}
|
|
88
|
+
/** Whether a page is the published home page: routed at the site root and not marked unpublished. */ const isPublishedHome = (screen)=>isRecord(screen) && screen['slug'] === SCREEN_ROOT_PATH && screen['published'] !== false;
|
|
89
|
+
/**
|
|
90
|
+
* Why a starter's payload cannot start a site, in the words its author is
|
|
91
|
+
* told, or `null` when it can (AGL-4049). Checked when a starter is published
|
|
92
|
+
* and again when one is resolved, since a site is created from it with no
|
|
93
|
+
* step between to catch what is missing.
|
|
94
|
+
*/ export function siteStarterRefusal(payload, known = {}) {
|
|
95
|
+
const screens = Array.isArray(payload.screens) ? payload.screens : [];
|
|
96
|
+
if (!screens.some(isPublishedHome)) return 'A starter needs a published Home page at /';
|
|
97
|
+
if (!isRecord(payload.layout)) return 'A starter needs a shared layout';
|
|
98
|
+
if (screens.length > SITE_STARTER_MAX_SCREENS) {
|
|
99
|
+
return `A starter can have at most ${SITE_STARTER_MAX_SCREENS} pages`;
|
|
100
|
+
}
|
|
101
|
+
const unknown = (id, ids)=>id !== null && ids !== undefined && !ids.has(id);
|
|
102
|
+
const { facets, theme } = payload;
|
|
103
|
+
if (unknown(facets.kind, known.kinds)) return `Unknown site kind "${facets.kind}"`;
|
|
104
|
+
if (unknown(facets.base, known.bases)) return `Unknown base theme "${facets.base}"`;
|
|
105
|
+
if (unknown(facets.fonts, known.fonts)) return `Unknown font pairing "${facets.fonts}"`;
|
|
106
|
+
if ((theme == null ? void 0 : theme.kind) === 'builtin') {
|
|
107
|
+
if (unknown(theme.base, known.bases)) return `Unknown base theme "${theme.base}"`;
|
|
108
|
+
if (unknown(theme.fonts, known.fonts)) return `Unknown font pairing "${theme.fonts}"`;
|
|
109
|
+
}
|
|
110
|
+
if (payload.mode === 'ai' && !isRecord(payload.answers)) {
|
|
111
|
+
return 'An AI starter needs the questions it asks';
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=site-starter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/site-starter.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 { HostTheme } from '@aglyn/shared-data-types'\nimport { SCREEN_ROOT_PATH } from './screen-slug'\n\n/**\n * Site starters (AGL-4049): a whole site a person picks before it exists,\n * every one of them a listing anyone may publish and price, the platform's own\n * included.\n *\n * This module is the vocabulary every reader of a starter shares: the artifact\n * type it is listed under, the facets a search filters on (stamped on the\n * listing as plain fields, so a query can match them), the payload a resolved\n * starter hands the site it creates, and the one check that payload must pass.\n * Who stores starters and how they are bought is the starter source's business\n * (`plugin-manager/plugin-site-starters.ts`); nothing here reads or writes.\n *\n * Pure data and readers, safe for any surface to import.\n */\n\n/** The artifact type a site starter is listed and installed under (AGL-4049). */\nexport const SITE_STARTER_ARTIFACT_TYPE = 'siteStarter' as const\n\n/**\n * How a starter fills the site it creates: `base` copies its pages as they\n * are; `ai` hands them to the AI site start with the answers it asks for, so\n * the pages are rewritten for the business.\n */\nexport type SiteStarterMode = 'base' | 'ai'\n\n/**\n * The platform's built-in themes a site's look is layered on (AGL-3497,\n * AGL-4049), by the short name of the themes plugin's preset id\n * (`theme-presets.<name>`), and `starter`: the theme a new site is born with.\n * A starter on a built-in theme names one of these; the AI site start picks\n * among the same list.\n */\nexport const SITE_THEME_BASES = [\n 'starter',\n 'material-ui',\n 'bootstrap',\n 'minimal',\n 'material3',\n 'ant-design',\n 'fluent',\n 'carbon',\n 'cupertino',\n] as const\nexport type SiteThemeBase = (typeof SITE_THEME_BASES)[number]\n\n/** Whether a value names one of the {@link SITE_THEME_BASES}. */\nexport function isSiteThemeBase(value: unknown): value is SiteThemeBase {\n return typeof value === 'string' && (SITE_THEME_BASES as readonly string[]).includes(value)\n}\n\n/**\n * A starter's theme (AGL-4049), one of two shapes: a built-in theme with the\n * starter's brand colors and font pairing over it, which is how a person's own\n * pick and edits are stored, or a full theme of its author's own.\n */\nexport type SiteStarterTheme =\n | {\n kind: 'builtin'\n /** One of the {@link SITE_THEME_BASES}. */\n base: string\n /** Palette overrides by scheme, as the theme editor stores them. */\n brand: { light: Record<string, string>; dark?: Record<string, string> }\n /** A font pairing id (`site-font-pairings.ts`), or `null` for the base theme's own fonts. */\n fonts: string | null\n }\n | { kind: 'full'; theme: HostTheme }\n\n/**\n * What a starter search filters on (AGL-4049). `kind` is the kind of site it\n * is, an id the core does not interpret (the AI plugin keeps the kinds),\n * `base` a {@link SITE_THEME_BASES} name and `fonts` a font pairing id\n * (`site-font-pairings.ts`), each `null` where the starter names none;\n * `pages` is how many pages it creates.\n */\nexport interface SiteStarterFacets {\n kind: string | null\n base: string | null\n fonts: string | null\n pages: number\n mode: SiteStarterMode\n}\n\n/** A person's pick: the listing, and the version when one is pinned. */\nexport interface SiteStarterChoice {\n listingId: string\n version?: string\n}\n\n/** What a resolved starter hands the site it creates (AGL-4049). */\nexport interface SiteStarterPayload {\n mode: SiteStarterMode\n facets: SiteStarterFacets\n theme: SiteStarterTheme\n /**\n * The starter's pages, each carrying its routing `slug` as a starter\n * template's screens do: `'/'` is the home page, and a page without one is\n * unpublished.\n */\n screens: unknown[]\n /** The shared layout every page sits in: the header and footer. */\n layout: unknown | null\n /** The questions an `ai` starter asks before the site job runs; required for `ai`. */\n answers?: Record<string, unknown>\n}\n\n/** The most pages one starter may create. */\nexport const SITE_STARTER_MAX_SCREENS = 25\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === 'object' && !Array.isArray(value)\n\nconst facetString = (value: unknown): string | null =>\n typeof value === 'string' && value.trim() ? value.trim() : null\n\n/**\n * A listing's starter facets, read defensively from the fields\n * {@link siteStarterFacetFields} stamps: a missing or malformed field reads as\n * none, a page count as a whole number from zero, and a mode as `base` unless\n * it says `ai`.\n */\nexport function siteStarterFacetsOf(doc: Record<string, unknown>): SiteStarterFacets {\n const pages = doc['starterPages']\n return {\n kind: facetString(doc['starterKind']),\n base: facetString(doc['starterBase']),\n fonts: facetString(doc['starterFonts']),\n pages: typeof pages === 'number' && Number.isFinite(pages) && pages > 0 ? Math.floor(pages) : 0,\n mode: doc['starterMode'] === 'ai' ? 'ai' : 'base',\n }\n}\n\n/** The listing fields a starter's publish stamps, the inverse of {@link siteStarterFacetsOf}. */\nexport function siteStarterFacetFields(facets: SiteStarterFacets): Record<string, unknown> {\n return {\n starterKind: facets.kind,\n starterBase: facets.base,\n starterFonts: facets.fonts,\n starterPages: facets.pages,\n starterMode: facets.mode,\n }\n}\n\nconst FACET_KEYS: readonly (keyof SiteStarterFacets)[] = ['kind', 'base', 'fonts', 'pages', 'mode']\n\n/** Whether a starter's facets meet a filter: every facet the filter names, equal; an absent one, any. */\nexport function matchSiteStarterFacets(\n facets: SiteStarterFacets,\n filter: Partial<SiteStarterFacets>,\n): boolean {\n return FACET_KEYS.every((key) => filter[key] === undefined || facets[key] === filter[key])\n}\n\n/** Whether a page is the published home page: routed at the site root and not marked unpublished. */\nconst isPublishedHome = (screen: unknown): boolean =>\n isRecord(screen) && screen['slug'] === SCREEN_ROOT_PATH && screen['published'] !== false\n\n/**\n * The ids a caller knows, by facet. `siteStarterRefusal` checks a kind, base\n * or font pairing id only against the set its caller passes: the core keeps\n * no list of kinds, and which bases and pairings are offered is the caller's\n * to say (`new Set(SITE_THEME_BASES)`, the ids of `SITE_FONT_PAIRINGS`).\n */\nexport interface SiteStarterKnownIds {\n kinds?: ReadonlySet<string>\n bases?: ReadonlySet<string>\n fonts?: ReadonlySet<string>\n}\n\n/**\n * Why a starter's payload cannot start a site, in the words its author is\n * told, or `null` when it can (AGL-4049). Checked when a starter is published\n * and again when one is resolved, since a site is created from it with no\n * step between to catch what is missing.\n */\nexport function siteStarterRefusal(payload: SiteStarterPayload, known: SiteStarterKnownIds = {}): string | null {\n const screens = Array.isArray(payload.screens) ? payload.screens : []\n if (!screens.some(isPublishedHome)) return 'A starter needs a published Home page at /'\n if (!isRecord(payload.layout)) return 'A starter needs a shared layout'\n if (screens.length > SITE_STARTER_MAX_SCREENS) {\n return `A starter can have at most ${SITE_STARTER_MAX_SCREENS} pages`\n }\n const unknown = (id: string | null, ids: ReadonlySet<string> | undefined) =>\n id !== null && ids !== undefined && !ids.has(id)\n const { facets, theme } = payload\n if (unknown(facets.kind, known.kinds)) return `Unknown site kind \"${facets.kind}\"`\n if (unknown(facets.base, known.bases)) return `Unknown base theme \"${facets.base}\"`\n if (unknown(facets.fonts, known.fonts)) return `Unknown font pairing \"${facets.fonts}\"`\n if (theme?.kind === 'builtin') {\n if (unknown(theme.base, known.bases)) return `Unknown base theme \"${theme.base}\"`\n if (unknown(theme.fonts, known.fonts)) return `Unknown font pairing \"${theme.fonts}\"`\n }\n if (payload.mode === 'ai' && !isRecord(payload.answers)) {\n return 'An AI starter needs the questions it asks'\n }\n return null\n}\n"],"names":["SCREEN_ROOT_PATH","SITE_STARTER_ARTIFACT_TYPE","SITE_THEME_BASES","isSiteThemeBase","value","includes","SITE_STARTER_MAX_SCREENS","isRecord","Array","isArray","facetString","trim","siteStarterFacetsOf","doc","pages","kind","base","fonts","Number","isFinite","Math","floor","mode","siteStarterFacetFields","facets","starterKind","starterBase","starterFonts","starterPages","starterMode","FACET_KEYS","matchSiteStarterFacets","filter","every","key","undefined","isPublishedHome","screen","siteStarterRefusal","payload","known","screens","some","layout","length","unknown","id","ids","has","theme","kinds","bases","answers"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,SAASA,gBAAgB,QAAQ,mBAAe;AAEhD;;;;;;;;;;;;;CAaC,GAED,+EAA+E,GAC/E,OAAO,MAAMC,6BAA6B,cAAsB;AAShE;;;;;;CAMC,GACD,OAAO,MAAMC,mBAAmB;IAC9B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAS;AAGV,+DAA+D,GAC/D,OAAO,SAASC,gBAAgBC,KAAc;IAC5C,OAAO,OAAOA,UAAU,YAAY,AAACF,iBAAuCG,QAAQ,CAACD;AACvF;AAyDA,2CAA2C,GAC3C,OAAO,MAAME,2BAA2B,GAAE;AAE1C,MAAMC,WAAW,CAAC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"}
|
|
@@ -19,9 +19,11 @@ import type { OrgPermissions } from '../app-utils/org-permissions';
|
|
|
19
19
|
import type { ReleaseFlagKey } from '../app-utils/release-flags';
|
|
20
20
|
import type { SeoAuditReport } from '../app-utils/seo-audit';
|
|
21
21
|
import type { SeoListingFieldKey } from '../app-utils/seo-listing-fields';
|
|
22
|
+
import type { SiteStarterFacets, SiteStarterMode } from '../app-utils/site-starter';
|
|
22
23
|
import type { AglynOrgBilling, OrgFeatureFlags } from '../foundation';
|
|
23
24
|
import type { ComponentSchema, MdiIconProps, PresetSchema } from '../types/nodes';
|
|
24
25
|
import type { Plugin, PluginId } from './plugin-manager';
|
|
26
|
+
import type { SiteStarterSummary } from './plugin-site-starters';
|
|
25
27
|
import type { HostThemeSource } from '../app-utils/site-theme';
|
|
26
28
|
import type { HostTheme, HostThemeScheme } from '@aglyn/shared-data-types';
|
|
27
29
|
import type { ComponentType, ReactNode } from 'react';
|
|
@@ -800,6 +802,19 @@ export declare const CONSOLE_WIDGET_SLOTS: {
|
|
|
800
802
|
* gets the shell's plain name-and-address dialog instead.
|
|
801
803
|
*/
|
|
802
804
|
readonly hostFirstRun: "hostFirstRun";
|
|
805
|
+
/**
|
|
806
|
+
* The starter picker inside "Start your site" (AGL-4049), drawn before the
|
|
807
|
+
* site exists. Props: {@link ConsoleHostStarterPickerZoneProps} — the
|
|
808
|
+
* workspace, how the site will be filled, the person's search and filter,
|
|
809
|
+
* `onPick` and `ready`.
|
|
810
|
+
*
|
|
811
|
+
* A pick is required: there is no Skip, and the listing the platform starts
|
|
812
|
+
* a site from by default comes first. A widget here lists and picks and
|
|
813
|
+
* creates nothing; the site is created by the dialog from the starter it was
|
|
814
|
+
* handed. Not a staff zone and not host-gated: the widget's own extension
|
|
815
|
+
* gates it, as on any other zone.
|
|
816
|
+
*/
|
|
817
|
+
readonly hostStarterPicker: "hostStarterPicker";
|
|
803
818
|
/**
|
|
804
819
|
* The host setup Theme section, between the Theme picker and the editor
|
|
805
820
|
* (AGL-2938). Props: {@link ConsoleHostThemeZoneProps} — the
|
|
@@ -1512,6 +1527,23 @@ export interface ConsoleArtifactPublishZoneProps {
|
|
|
1512
1527
|
/** Closes it, however it was closed — cancelled, published, or refused. */
|
|
1513
1528
|
onClose: () => void;
|
|
1514
1529
|
}
|
|
1530
|
+
/** What the `hostStarterPicker` zone hands each widget (AGL-4049). */
|
|
1531
|
+
export interface ConsoleHostStarterPickerZoneProps {
|
|
1532
|
+
/** The org the site will belong to; `undefined` while it resolves. */
|
|
1533
|
+
orgId: string | undefined;
|
|
1534
|
+
/** Path slug for building `/[orgSlug]/…` links. */
|
|
1535
|
+
orgSlug: string;
|
|
1536
|
+
/** How the site will be filled: its pages as they are, or by the AI site start. */
|
|
1537
|
+
mode: SiteStarterMode;
|
|
1538
|
+
/** The person's search words, as typed. */
|
|
1539
|
+
search: string;
|
|
1540
|
+
/** The facets the person narrowed to; an absent one is any. */
|
|
1541
|
+
filter: Partial<SiteStarterFacets>;
|
|
1542
|
+
/** Hands the dialog the starter the person picked. */
|
|
1543
|
+
onPick: (pick: SiteStarterSummary) => void;
|
|
1544
|
+
/** Reports whether the widget drew a picker; `false` gives the dialog its own default. */
|
|
1545
|
+
ready: (shown: boolean) => void;
|
|
1546
|
+
}
|
|
1515
1547
|
/** What the `hostTheme` zone hands each widget (AGL-2938). */
|
|
1516
1548
|
export interface ConsoleHostThemeZoneProps {
|
|
1517
1549
|
hostId: string;
|
|
@@ -295,6 +295,18 @@ import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
|
295
295
|
* gets the shell's plain name-and-address dialog instead.
|
|
296
296
|
*/ hostFirstRun: 'hostFirstRun',
|
|
297
297
|
/**
|
|
298
|
+
* The starter picker inside "Start your site" (AGL-4049), drawn before the
|
|
299
|
+
* site exists. Props: {@link ConsoleHostStarterPickerZoneProps} — the
|
|
300
|
+
* workspace, how the site will be filled, the person's search and filter,
|
|
301
|
+
* `onPick` and `ready`.
|
|
302
|
+
*
|
|
303
|
+
* A pick is required: there is no Skip, and the listing the platform starts
|
|
304
|
+
* a site from by default comes first. A widget here lists and picks and
|
|
305
|
+
* creates nothing; the site is created by the dialog from the starter it was
|
|
306
|
+
* handed. Not a staff zone and not host-gated: the widget's own extension
|
|
307
|
+
* gates it, as on any other zone.
|
|
308
|
+
*/ hostStarterPicker: 'hostStarterPicker',
|
|
309
|
+
/**
|
|
298
310
|
* The host setup Theme section, between the Theme picker and the editor
|
|
299
311
|
* (AGL-2938). Props: {@link ConsoleHostThemeZoneProps} — the
|
|
300
312
|
* site, the theme the editor shows, where that theme came from, the
|