bearminion 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/astro.d.ts +97 -62
- package/dist/astro.js +151 -1717
- package/dist/cli.js +1 -1
- package/dist/collections-BbL4_4jt.js +735 -0
- package/dist/content.d.ts +1 -1
- package/dist/content.js +1 -1
- package/dist/{draft-store-1Y4-sn45.js → draft-store-DBEfw_Gq.js} +10 -1
- package/dist/editor-context-BBsL5NFx.d.ts +310 -0
- package/dist/{forms-dev-CEab55ss.js → forms-dev-CzUHR7oS.js} +1 -1
- package/dist/github-store-DLQazToO.d.ts +64 -0
- package/dist/github-store-DUf07ODw.js +1705 -0
- package/dist/hosted-astro.d.ts +6 -0
- package/dist/hosted-astro.js +15 -0
- package/dist/hosted-middleware-DTnZoRsK.js +343 -0
- package/dist/hosted-overlay.d.ts +2 -0
- package/dist/hosted-overlay.js +2 -0
- package/dist/hosted.d.ts +191 -0
- package/dist/hosted.js +202 -0
- package/dist/index.d.ts +3 -104
- package/dist/index.js +2 -2
- package/dist/{page-CwbIDegI.d.ts → page-D1pdneYm.d.ts} +223 -223
- package/dist/{reload-BIIa7pej.js → reload-BzVw721A.js} +1 -1
- package/dist/{security-FLvgc2jD.js → request-guards-BcSUj8Gc.js} +22 -25
- package/dist/security-CBiOYdVE.js +24 -0
- package/dist/ui/mount.js +1 -1
- package/package.json +20 -3
- package/registry/default/registry.json +1 -1
- package/dist/options-CosfIOMs.d.ts +0 -211
- package/dist/preview-ImEm3T8k.js +0 -125
package/dist/hosted.d.ts
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { _ as CollectionOptions, n as ImageConvertOptions, t as EditorContext, v as collection, y as ContentStore } from "./editor-context-BBsL5NFx.js";
|
|
2
|
+
import { i as StoreKeyError, n as githubStore, r as StoreError, t as GithubStoreOptions } from "./github-store-DLQazToO.js";
|
|
3
|
+
import { g as ContentModel, n as PageRules, t as Page } from "./page-D1pdneYm.js";
|
|
4
|
+
//#region src/api.d.ts
|
|
5
|
+
interface HandleMeta {
|
|
6
|
+
/**
|
|
7
|
+
* Hosted editor only. The caller has already signed the person in and checked that they may edit, so the localhost
|
|
8
|
+
* check is replaced by a same-origin check. Never set it on a route that has no sign-in in front of it: with it,
|
|
9
|
+
* anyone who can reach the handler can write the content.
|
|
10
|
+
*/
|
|
11
|
+
authenticated?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* TCP peer address. Pass it from the dev server.
|
|
14
|
+
* When it is omitted, only Host and Origin are checked.
|
|
15
|
+
*/
|
|
16
|
+
remoteAddress?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Dev-only. Renders draft JSON to HTML without writing it.
|
|
19
|
+
* Omit it outside `astro dev`.
|
|
20
|
+
*/
|
|
21
|
+
renderPreview?: (page: unknown, motion: boolean) => Promise<string>;
|
|
22
|
+
/** Dev-only. Renders the header and footer of a draft site. Optional: a project without it keeps reload-to-see. */
|
|
23
|
+
renderSitePreview?: (site: unknown, pathname: string) => Promise<{
|
|
24
|
+
header: string;
|
|
25
|
+
footer: string;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/hosted-context.d.ts
|
|
30
|
+
export interface HostedEditorOptions extends ContentModel {
|
|
31
|
+
/** Where content lives, such as `githubStore({ ... })`. */
|
|
32
|
+
store: ContentStore;
|
|
33
|
+
/** Largest image accepted, in bytes. Default 5 MB. */
|
|
34
|
+
maxImageBytes?: number;
|
|
35
|
+
/** Re-encode images in the browser before upload. Default: off. */
|
|
36
|
+
imageConvert?: false | ImageConvertOptions;
|
|
37
|
+
/** Which page operations are allowed. */
|
|
38
|
+
pages?: Partial<PageRules>;
|
|
39
|
+
/** Markdown collections, by id. See `collection()`. */
|
|
40
|
+
collections?: Record<string, CollectionOptions>;
|
|
41
|
+
}
|
|
42
|
+
/** The context for `handleEditorRequest`. */
|
|
43
|
+
export declare function createHostedContext(options: HostedEditorOptions): EditorContext;
|
|
44
|
+
/** Handle one editor API request. Returns `null` for a path that is not the editor API. Sign the person in first. */
|
|
45
|
+
export declare function handleHostedRequest(request: Request, context: EditorContext, meta?: Omit<HandleMeta, 'authenticated'>): Promise<Response | null>;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/hosted-auth.d.ts
|
|
48
|
+
export declare const AUTH_PREFIX = "/__bearminion/auth";
|
|
49
|
+
interface HostedSession {
|
|
50
|
+
/** GitHub login of the signed-in person. */
|
|
51
|
+
login: string;
|
|
52
|
+
/** GitHub user id. */
|
|
53
|
+
id: number;
|
|
54
|
+
/** The person's GitHub token, used for every store call. Never leaves the encrypted cookie and the server. */
|
|
55
|
+
token: string;
|
|
56
|
+
/** When the token expires, in milliseconds since the epoch. */
|
|
57
|
+
expiresAt: number;
|
|
58
|
+
refreshToken?: string;
|
|
59
|
+
refreshExpiresAt?: number;
|
|
60
|
+
/** When the person signed in. The session ends `sessionDays` later, whatever the refresh token allows. */
|
|
61
|
+
issuedAt: number;
|
|
62
|
+
}
|
|
63
|
+
interface HostedAuthOptions {
|
|
64
|
+
/** The GitHub App's client id. */
|
|
65
|
+
clientId: string;
|
|
66
|
+
/** The GitHub App's client secret. Keep it in the environment. */
|
|
67
|
+
clientSecret: string;
|
|
68
|
+
/** At least 32 characters of randomness. Encrypts the cookies. Changing it signs everyone out. */
|
|
69
|
+
secret: string;
|
|
70
|
+
/** `owner/name`. Only people with push access to this repository may sign in. */
|
|
71
|
+
repo: string;
|
|
72
|
+
/**
|
|
73
|
+
* The public origin of the editor, `https://admin.example.com`. Default: the origin of the request, which is wrong
|
|
74
|
+
* behind a proxy that rewrites the scheme or host, so set it there. The GitHub App's callback URL must be
|
|
75
|
+
* `<origin>/__bearminion/auth/callback`.
|
|
76
|
+
*/
|
|
77
|
+
origin?: string;
|
|
78
|
+
/** A session ends this many days after sign-in. Default 7. */
|
|
79
|
+
sessionDays?: number;
|
|
80
|
+
/** GitHub's web address, for GitHub Enterprise. Default `https://github.com`. */
|
|
81
|
+
githubUrl?: string;
|
|
82
|
+
/** GitHub's API address. Default `https://api.github.com`. */
|
|
83
|
+
apiUrl?: string;
|
|
84
|
+
fetch?: typeof fetch;
|
|
85
|
+
/** The clock, in milliseconds. For tests. */
|
|
86
|
+
now?: () => number;
|
|
87
|
+
}
|
|
88
|
+
interface HostedAuth {
|
|
89
|
+
/** Answers `/__bearminion/auth/*`. Returns `null` for any other path. */
|
|
90
|
+
handle(request: Request): Promise<Response | null>;
|
|
91
|
+
/**
|
|
92
|
+
* The signed-in person for a request, or `null`. `cookie` is a `Set-Cookie` value to send back when the token was
|
|
93
|
+
* renewed on the way.
|
|
94
|
+
*/
|
|
95
|
+
authenticate(request: Request): Promise<{
|
|
96
|
+
session: HostedSession;
|
|
97
|
+
cookie?: string;
|
|
98
|
+
} | null>;
|
|
99
|
+
}
|
|
100
|
+
export declare function createHostedAuth(options: HostedAuthOptions): HostedAuth;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/store-content.d.ts
|
|
103
|
+
interface StoreContent {
|
|
104
|
+
/** `site.json`. Throws `ContentReadError` when it is missing or not JSON, `ContentValidationError` when it is invalid. */
|
|
105
|
+
getSite(): Promise<unknown>;
|
|
106
|
+
/** One page by slug (the home page is `index`), or `undefined` when there is none or the slug is not a slug. */
|
|
107
|
+
getPage(slug: string): Promise<Page | undefined>;
|
|
108
|
+
}
|
|
109
|
+
interface StoreContentOptions {
|
|
110
|
+
/**
|
|
111
|
+
* Keep a page that holds a section type the site dropped, and leave that section out of what is returned. The editor
|
|
112
|
+
* needs it to open such a page and remove the section. Default true.
|
|
113
|
+
*/
|
|
114
|
+
tolerateOrphans?: boolean;
|
|
115
|
+
}
|
|
116
|
+
export declare function createStoreContent(model: ContentModel, store: ContentStore, options?: StoreContentOptions): StoreContent;
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/hosted-editor.d.ts
|
|
119
|
+
/** Where the signed-in editor loads the overlay from. */
|
|
120
|
+
export declare const EDITOR_SCRIPT_PATH = "/__bearminion/editor.js";
|
|
121
|
+
interface HostedEditorConfig extends ContentModel {
|
|
122
|
+
/** `owner/name`. People with push access to it may sign in. */
|
|
123
|
+
repo: string;
|
|
124
|
+
/** The GitHub App the sign-in uses. `repo` is filled in from the top level. */
|
|
125
|
+
auth: Omit<HostedAuthOptions, 'repo' | 'fetch' | 'now' | 'githubUrl' | 'apiUrl'>;
|
|
126
|
+
/** Branch, folders, mode (`direct` or `pr`), commit messages. The token and repo come from sign-in and `repo`. */
|
|
127
|
+
store?: Omit<GithubStoreOptions, 'repo' | 'token' | 'fetch' | 'apiUrl'>;
|
|
128
|
+
collections?: Record<string, CollectionOptions>;
|
|
129
|
+
pages?: Partial<PageRules>;
|
|
130
|
+
maxImageBytes?: number;
|
|
131
|
+
imageConvert?: false | ImageConvertOptions;
|
|
132
|
+
/**
|
|
133
|
+
* The editor overlay as a browser script: `overlaySource` from `bearminion/hosted-overlay`. Served at
|
|
134
|
+
* `/__bearminion/editor.js` to signed-in people only, and added to the site's pages by `inject`.
|
|
135
|
+
*/
|
|
136
|
+
overlay?: string;
|
|
137
|
+
/** GitHub Enterprise: the web and API addresses. */
|
|
138
|
+
githubUrl?: string;
|
|
139
|
+
apiUrl?: string;
|
|
140
|
+
fetch?: typeof fetch;
|
|
141
|
+
/** The clock, in milliseconds. For tests. */
|
|
142
|
+
now?: () => number;
|
|
143
|
+
}
|
|
144
|
+
interface HostedEditor {
|
|
145
|
+
/**
|
|
146
|
+
* Answers `/__bearminion/auth/*` (sign-in) and `/__bearminion/api/*` (the editor API, signed-in people only).
|
|
147
|
+
* Returns `null` for any other path, so the site's own routes carry on.
|
|
148
|
+
*/
|
|
149
|
+
handle(request: Request): Promise<Response | null>;
|
|
150
|
+
/**
|
|
151
|
+
* Passes a page the site rendered through, adding the editor overlay when the request comes from a signed-in
|
|
152
|
+
* person. Anyone else gets the page untouched. A page with the overlay is marked `private, no-store`, so no cache
|
|
153
|
+
* can hand it to a visitor. Needs `overlay`.
|
|
154
|
+
*/
|
|
155
|
+
inject(request: Request, response: Response): Promise<Response>;
|
|
156
|
+
/**
|
|
157
|
+
* The signed-in person's view of the repository for this request: their store and the site's pages read from it.
|
|
158
|
+
* `null` when nobody is signed in. Costs one sign-in check per request, however often it is called.
|
|
159
|
+
*/
|
|
160
|
+
scope(request: Request): Promise<HostedScope | null>;
|
|
161
|
+
auth: HostedAuth;
|
|
162
|
+
}
|
|
163
|
+
interface HostedScope {
|
|
164
|
+
/** GitHub login of the signed-in person. */
|
|
165
|
+
login: string;
|
|
166
|
+
/** The repository as this person sees it: reads and writes use their GitHub token. */
|
|
167
|
+
store: ContentStore;
|
|
168
|
+
/** `site.json` and pages from `store`, checked the way the build checks them. */
|
|
169
|
+
content: StoreContent;
|
|
170
|
+
}
|
|
171
|
+
export declare function createHostedEditor(config: HostedEditorConfig): HostedEditor;
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/hosted-middleware.d.ts
|
|
174
|
+
/** What the site's pages find at `Astro.locals.bearminion` while someone is signed in. */
|
|
175
|
+
type HostedLocals = HostedScope;
|
|
176
|
+
interface HostedMiddlewareOptions {
|
|
177
|
+
/**
|
|
178
|
+
* `required` (default): this deployment is the editor, so a visitor who is not signed in is sent to sign in, and
|
|
179
|
+
* requests that are not page loads get 401. `optional`: visitors get the site as it is; only signed-in people get the
|
|
180
|
+
* live content and the overlay.
|
|
181
|
+
*/
|
|
182
|
+
signIn?: 'required' | 'optional';
|
|
183
|
+
}
|
|
184
|
+
interface HostedMiddlewareContext {
|
|
185
|
+
request: Request;
|
|
186
|
+
locals: object;
|
|
187
|
+
}
|
|
188
|
+
type HostedMiddleware = (context: HostedMiddlewareContext, next: () => Promise<Response>) => Promise<Response>;
|
|
189
|
+
export declare function createHostedMiddleware(editor: HostedEditor, options?: HostedMiddlewareOptions): HostedMiddleware;
|
|
190
|
+
//#endregion
|
|
191
|
+
export { type CollectionOptions, type ContentStore, type EditorContext, type GithubStoreOptions, type HostedAuth, type HostedAuthOptions, type HostedEditor, type HostedEditorConfig, type HostedLocals, type HostedMiddleware, type HostedMiddlewareContext, type HostedMiddlewareOptions, type HostedScope, type HostedSession, type StoreContent, type StoreContentOptions, StoreError, StoreKeyError, collection, githubStore };
|
package/dist/hosted.js
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { D as ContentReadError, O as ContentValidationError, c as resolveCollections, g as pageKey, h as SITE_KEY, t as collection, v as StoreError, y as StoreKeyError } from "./collections-BbL4_4jt.js";
|
|
2
|
+
import { t as defaultTheme } from "./theme-BvqJ8UnS.js";
|
|
3
|
+
import { a as resolvePageRules, c as withoutOrphanSections, n as createPageSchema, r as createTolerantPageSchema, s as slugSchema } from "./page-wlcQJAA-.js";
|
|
4
|
+
import { n as createMigrator } from "./migrate-b408EaLp.js";
|
|
5
|
+
import { i as resolveMaxImageBytes, r as resolveConvert } from "./upload-rules-Cao9uY5K.js";
|
|
6
|
+
import { d as DEFAULT_VIDEO_BYTE_LIMIT, n as handleEditorRequest, t as githubStore } from "./github-store-DUf07ODw.js";
|
|
7
|
+
import { n as AUTH_PREFIX, r as createHostedAuth, t as createHostedMiddleware } from "./hosted-middleware-DTnZoRsK.js";
|
|
8
|
+
//#region src/hosted-context.ts
|
|
9
|
+
/** The context for `handleEditorRequest`. */
|
|
10
|
+
function createHostedContext(options) {
|
|
11
|
+
if (!options.sections) throw new Error("createHostedContext() needs the `sections` option: the site's section definitions.");
|
|
12
|
+
if (!options.site) throw new Error("createHostedContext() needs the `site` option: the site definition from defineSite().");
|
|
13
|
+
if (!options.store) throw new Error("createHostedContext() needs the `store` option, such as githubStore({ ... }).");
|
|
14
|
+
return {
|
|
15
|
+
root: "",
|
|
16
|
+
contentDir: "",
|
|
17
|
+
uploadsDir: "",
|
|
18
|
+
videosDir: "",
|
|
19
|
+
maxVideoBytes: DEFAULT_VIDEO_BYTE_LIMIT,
|
|
20
|
+
maxImageBytes: resolveMaxImageBytes(options.maxImageBytes),
|
|
21
|
+
pageRules: resolvePageRules(options.pages),
|
|
22
|
+
imageConvert: resolveConvert(options.imageConvert),
|
|
23
|
+
sections: options.sections,
|
|
24
|
+
site: options.site,
|
|
25
|
+
theme: options.theme ?? defaultTheme,
|
|
26
|
+
store: options.store,
|
|
27
|
+
migrator: createMigrator(options),
|
|
28
|
+
git: false,
|
|
29
|
+
...options.collections ? { collections: resolveCollections(options.collections) } : {}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** Handle one editor API request. Returns `null` for a path that is not the editor API. Sign the person in first. */
|
|
33
|
+
function handleHostedRequest(request, context, meta = {}) {
|
|
34
|
+
return handleEditorRequest(request, context, {
|
|
35
|
+
...meta,
|
|
36
|
+
authenticated: true
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/store-content.ts
|
|
41
|
+
function createStoreContent(model, store, options = {}) {
|
|
42
|
+
const migrator = createMigrator(model);
|
|
43
|
+
const tolerant = options.tolerateOrphans !== false;
|
|
44
|
+
async function read(key, kind) {
|
|
45
|
+
const text = await store.read(key);
|
|
46
|
+
if (text === void 0) return void 0;
|
|
47
|
+
let raw;
|
|
48
|
+
try {
|
|
49
|
+
raw = JSON.parse(text);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
throw new ContentReadError(key, `Invalid JSON in ${key}: ${error instanceof Error ? error.message : String(error)}`);
|
|
52
|
+
}
|
|
53
|
+
const upgraded = migrator.upgrade(raw, kind);
|
|
54
|
+
if (!upgraded.ok) throw new ContentValidationError(key, [{
|
|
55
|
+
path: [],
|
|
56
|
+
message: upgraded.message
|
|
57
|
+
}]);
|
|
58
|
+
return upgraded.value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
async getSite() {
|
|
62
|
+
const raw = await read(SITE_KEY, "site");
|
|
63
|
+
if (raw === void 0) throw new ContentReadError(SITE_KEY, `Content file not found: ${SITE_KEY}`);
|
|
64
|
+
const parsed = model.site.schema.safeParse(raw);
|
|
65
|
+
if (!parsed.success) throw new ContentValidationError(SITE_KEY, parsed.error.issues);
|
|
66
|
+
return parsed.data;
|
|
67
|
+
},
|
|
68
|
+
async getPage(slug) {
|
|
69
|
+
if (!slugSchema.safeParse(slug).success) return void 0;
|
|
70
|
+
const key = pageKey(slug);
|
|
71
|
+
const raw = await read(key, "page");
|
|
72
|
+
if (raw === void 0) return void 0;
|
|
73
|
+
const parsed = (tolerant ? createTolerantPageSchema(model.sections) : createPageSchema(model.sections)).safeParse(raw);
|
|
74
|
+
if (!parsed.success) throw new ContentValidationError(key, parsed.error.issues);
|
|
75
|
+
return withoutOrphanSections(parsed.data, model.sections);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/hosted-editor.ts
|
|
81
|
+
/** Where the signed-in editor loads the overlay from. */
|
|
82
|
+
const EDITOR_SCRIPT_PATH = "/__bearminion/editor.js";
|
|
83
|
+
function unauthenticated() {
|
|
84
|
+
return new Response(JSON.stringify({
|
|
85
|
+
error: "unauthenticated",
|
|
86
|
+
message: "Sign in to edit.",
|
|
87
|
+
login: `${AUTH_PREFIX}/login`
|
|
88
|
+
}), {
|
|
89
|
+
status: 401,
|
|
90
|
+
headers: {
|
|
91
|
+
"content-type": "application/json; charset=utf-8",
|
|
92
|
+
"cache-control": "no-store",
|
|
93
|
+
"x-content-type-options": "nosniff"
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function createHostedEditor(config) {
|
|
98
|
+
const auth = createHostedAuth({
|
|
99
|
+
...config.auth,
|
|
100
|
+
repo: config.repo,
|
|
101
|
+
...config.githubUrl ? { githubUrl: config.githubUrl } : {},
|
|
102
|
+
...config.apiUrl ? { apiUrl: config.apiUrl } : {},
|
|
103
|
+
...config.fetch ? { fetch: config.fetch } : {},
|
|
104
|
+
...config.now ? { now: config.now } : {}
|
|
105
|
+
});
|
|
106
|
+
const checked = /* @__PURE__ */ new WeakMap();
|
|
107
|
+
function authenticate(request) {
|
|
108
|
+
let found = checked.get(request);
|
|
109
|
+
if (!found) {
|
|
110
|
+
found = auth.authenticate(request);
|
|
111
|
+
checked.set(request, found);
|
|
112
|
+
}
|
|
113
|
+
return found;
|
|
114
|
+
}
|
|
115
|
+
function storeFor(token) {
|
|
116
|
+
return githubStore({
|
|
117
|
+
...config.store,
|
|
118
|
+
repo: config.repo,
|
|
119
|
+
token,
|
|
120
|
+
...config.apiUrl ? { apiUrl: config.apiUrl } : {},
|
|
121
|
+
...config.fetch ? { fetch: config.fetch } : {}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
async function scope(request) {
|
|
125
|
+
const found = await authenticate(request);
|
|
126
|
+
if (!found) return null;
|
|
127
|
+
const store = storeFor(found.session.token);
|
|
128
|
+
return {
|
|
129
|
+
login: found.session.login,
|
|
130
|
+
store,
|
|
131
|
+
content: createStoreContent(config, store)
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
async function handle(request) {
|
|
135
|
+
const signIn = await auth.handle(request);
|
|
136
|
+
if (signIn) return signIn;
|
|
137
|
+
const pathname = new URL(request.url).pathname.replace(/\/+$/, "");
|
|
138
|
+
if (pathname === "/__bearminion/editor.js") {
|
|
139
|
+
if (config.overlay === void 0) return null;
|
|
140
|
+
if (request.method !== "GET") return new Response("Method not allowed", {
|
|
141
|
+
status: 405,
|
|
142
|
+
headers: { allow: "GET" }
|
|
143
|
+
});
|
|
144
|
+
const signedIn = await authenticate(request);
|
|
145
|
+
if (!signedIn) return unauthenticated();
|
|
146
|
+
const script = new Response(config.overlay, { headers: {
|
|
147
|
+
"content-type": "text/javascript; charset=utf-8",
|
|
148
|
+
"cache-control": "private, no-cache",
|
|
149
|
+
"x-content-type-options": "nosniff"
|
|
150
|
+
} });
|
|
151
|
+
if (signedIn.cookie) script.headers.append("set-cookie", signedIn.cookie);
|
|
152
|
+
return script;
|
|
153
|
+
}
|
|
154
|
+
if (pathname !== "/__bearminion/api" && !pathname.startsWith(`/__bearminion/api/`)) return null;
|
|
155
|
+
const found = await authenticate(request);
|
|
156
|
+
if (!found) return unauthenticated();
|
|
157
|
+
const response = await handleHostedRequest(request, createHostedContext({
|
|
158
|
+
sections: config.sections,
|
|
159
|
+
site: config.site,
|
|
160
|
+
...config.theme ? { theme: config.theme } : {},
|
|
161
|
+
...config.collections ? { collections: config.collections } : {},
|
|
162
|
+
...config.pages ? { pages: config.pages } : {},
|
|
163
|
+
...config.maxImageBytes === void 0 ? {} : { maxImageBytes: config.maxImageBytes },
|
|
164
|
+
...config.imageConvert === void 0 ? {} : { imageConvert: config.imageConvert },
|
|
165
|
+
...config.migrations ? { migrations: config.migrations } : {},
|
|
166
|
+
...config.schemaVersion === void 0 ? {} : { schemaVersion: config.schemaVersion },
|
|
167
|
+
store: storeFor(found.session.token)
|
|
168
|
+
}));
|
|
169
|
+
if (response && found.cookie) response.headers.append("set-cookie", found.cookie);
|
|
170
|
+
return response;
|
|
171
|
+
}
|
|
172
|
+
const tag = `<script type="module" src="${EDITOR_SCRIPT_PATH}"><\/script>`;
|
|
173
|
+
async function inject(request, response) {
|
|
174
|
+
if (config.overlay === void 0 || request.method !== "GET" || response.status !== 200) return response;
|
|
175
|
+
if (!(response.headers.get("content-type") ?? "").toLowerCase().includes("text/html")) return response;
|
|
176
|
+
const signedIn = await authenticate(request);
|
|
177
|
+
if (!signedIn) return response;
|
|
178
|
+
const html = await response.text();
|
|
179
|
+
if (html.includes("/__bearminion/editor.js")) return new Response(html, response);
|
|
180
|
+
const close = html.search(/<\/body\s*>(?![\s\S]*<\/body\s*>)/i);
|
|
181
|
+
const body = close === -1 ? html + tag : html.slice(0, close) + tag + html.slice(close);
|
|
182
|
+
const headers = new Headers(response.headers);
|
|
183
|
+
headers.delete("content-length");
|
|
184
|
+
headers.delete("etag");
|
|
185
|
+
headers.set("cache-control", "private, no-store");
|
|
186
|
+
headers.append("vary", "Cookie");
|
|
187
|
+
if (signedIn.cookie) headers.append("set-cookie", signedIn.cookie);
|
|
188
|
+
return new Response(body, {
|
|
189
|
+
status: response.status,
|
|
190
|
+
statusText: response.statusText,
|
|
191
|
+
headers
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
handle,
|
|
196
|
+
inject,
|
|
197
|
+
scope,
|
|
198
|
+
auth
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
export { AUTH_PREFIX, EDITOR_SCRIPT_PATH, StoreError, StoreKeyError, collection, createHostedAuth, createHostedContext, createHostedEditor, createHostedMiddleware, createStoreContent, githubStore, handleHostedRequest };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as CollectionOptions, a as CommitRequest, c as HistoryEntry, d as SaveResponse, f as SitePreview, g as GitInfo, h as ChangedFile, i as ApiProblem, l as PageListItem, m as UploadedVideo, o as CommitResult, p as UploadedImage, r as ApiIssue, s as CreatePageRequest, u as SaveRequest, v as collection } from "./editor-context-BBsL5NFx.js";
|
|
2
2
|
import { _ as renderMarkedHtml, a as WeightMark, f as markClass, g as reconcileMarks, i as TextRun, l as fontMarks, m as marksFromEmphasis, o as applyTextMark, r as TextMark, t as FontMark, v as splitMarkedText, y as weightMarks } from "./marks-BzLa48Y9.js";
|
|
3
|
-
import "./
|
|
3
|
+
import { $ as mergeJsonLd, $t as tones, A as SectionDefinition, At as MAX_NAV_DEPTH, B as FieldIcons, Bt as toneSchema, C as ContentMigration, Ct as siteConsentSchema, D as SCHEMA_VERSION_KEY, Dt as ButtonStyle, E as DocumentKind, Et as themeSchema, F as defineWireframe, Ft as imageSchema, G as SiteJsonLdIds, Gt as EnumOption, H as ShowWhen, Ht as withEmphasis, I as wireKinds, It as linkSchema, J as generateSiteJsonLd, Jt as StringOption, K as SiteJsonLdSource, Kt as NumberOption, L as wireframeIssues, Lt as richTextSchema, M as WireKind, Mt as Text, N as WireRect, Nt as Tone, O as createMigrator, Ot as Image, P as Wireframe, Pt as htmlIdSchema, Q as jsonLdWarnings, Qt as toneOption, R as OptionalContent, Rt as textMarkSchema, S as defineTheme, St as siteAnalyticsSchema, T as ContentVersioning, Tt as themeColorsSchema, U as JsonLdBlock, Ut as BooleanOption, V as ShowCondition, Vt as trackingIdSchema, W as JsonLdResult, Wt as CountRule, X as isPlaceholderSiteUrl, Xt as motionOption, Y as hasJsonLdId, Yt as buttonStyles, Z as jsonLdSchema, Zt as themeModes, _ as SectionRegistry, _t as SiteSeo, a as createPageSchema, at as DEFAULT_MAX_HEADER_ACTIONS, b as ThemeFont, bt as brandLogoSchema, c as withoutOrphanSections, ct as FooterConfig, d as SectionOf, dt as Site, en as variantOption, et as parseJsonLdInput, f as anchorSchema, ft as SiteAnalytics, g as ContentModel, gt as SiteOf, h as API_PREFIX, ht as SiteDefinition, i as Seo, it as DEFAULT_MAX_FOOTER_COLUMNS, j as defineSection, jt as RichText, k as SectionConfig, kt as Link, l as BaseSection, lt as Header, m as sectionIdSchema, mt as SiteConsent, nt as upsertJsonLd, o as isSystemPage, ot as Footer, p as createSectionSchema, pt as SiteConfig, q as formatJsonLd, qt as Option, r as SYSTEM_PAGES, rt as BRAND_LOGO_HEIGHT, s as seoSchema, st as FooterColumn, t as Page, tt as siteJsonLdIds, u as PropsOf, ut as HeaderConfig, v as ThemeConfig, vt as SiteWith, w as ContentMigrator, wt as siteSeoSchema, x as defaultTheme, xt as defineSite, y as ThemeDefinition, yt as Theme, z as FieldChoices, zt as textSchema } from "./page-D1pdneYm.js";
|
|
4
4
|
import { a as TURNSTILE_FIELD, i as HONEYPOT_FIELD, n as FormResult, r as FormSubmission, t as FormFieldErrors } from "./form-contract-BURSJP3Y.js";
|
|
5
5
|
//#region src/errors.d.ts
|
|
6
6
|
/** One schema problem, addressed by a dot path such as `sections.0.props.heading`. */
|
|
@@ -94,107 +94,6 @@ type MediaSource = {
|
|
|
94
94
|
export declare const VIDEO_FILE: RegExp;
|
|
95
95
|
export declare function parseMediaSource(value: string): MediaSource | null;
|
|
96
96
|
//#endregion
|
|
97
|
-
//#region src/git.d.ts
|
|
98
|
-
type ChangeStatus = 'added' | 'modified' | 'deleted' | 'renamed' | 'untracked';
|
|
99
|
-
interface ChangedFile {
|
|
100
|
-
/** Path relative to the project root, with `/` separators. */
|
|
101
|
-
path: string;
|
|
102
|
-
status: ChangeStatus;
|
|
103
|
-
}
|
|
104
|
-
interface GitInfo {
|
|
105
|
-
/** The `git` option is on. */
|
|
106
|
-
enabled: boolean;
|
|
107
|
-
/** The project is inside a git work tree. */
|
|
108
|
-
repo: boolean;
|
|
109
|
-
branch?: string;
|
|
110
|
-
files: ChangedFile[];
|
|
111
|
-
}
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region src/api-types.d.ts
|
|
114
|
-
/**
|
|
115
|
-
* Request and response bodies of the dev editor API (`/__bearminion/api`). The server handlers and the
|
|
116
|
-
* overlay's client both use these, so a changed shape is a type error on both sides.
|
|
117
|
-
*/
|
|
118
|
-
/** Every error response. `issues` is present on schema validation failures. */
|
|
119
|
-
interface ApiProblem {
|
|
120
|
-
error: string;
|
|
121
|
-
message: string;
|
|
122
|
-
issues?: ApiIssue[];
|
|
123
|
-
}
|
|
124
|
-
/** One validation failure: a dotted path into the document and a message. */
|
|
125
|
-
interface ApiIssue {
|
|
126
|
-
path: string;
|
|
127
|
-
message: string;
|
|
128
|
-
/** Present on `POST /save`, which validates the page and the site together. */
|
|
129
|
-
file?: 'page' | 'site';
|
|
130
|
-
}
|
|
131
|
-
/** `GET /pages`. */
|
|
132
|
-
interface PageListItem {
|
|
133
|
-
slug: string;
|
|
134
|
-
title: string;
|
|
135
|
-
/** File name inside the pages directory. */
|
|
136
|
-
file: string;
|
|
137
|
-
system?: boolean;
|
|
138
|
-
anchors?: string[];
|
|
139
|
-
}
|
|
140
|
-
/** `GET /images` entries and the body of a successful `POST /images`. */
|
|
141
|
-
interface UploadedImage {
|
|
142
|
-
filename: string;
|
|
143
|
-
/** Project-relative path, the value image fields store. */
|
|
144
|
-
path: string;
|
|
145
|
-
bytes?: number;
|
|
146
|
-
}
|
|
147
|
-
/** `GET /videos` entries and the body of a successful `POST /videos`. */
|
|
148
|
-
interface UploadedVideo {
|
|
149
|
-
filename: string;
|
|
150
|
-
/** Project-relative path of the file. */
|
|
151
|
-
path: string;
|
|
152
|
-
/** What a Media section's `video` field holds, such as `/videos/demo-1a2b3c4d.mp4`. */
|
|
153
|
-
url: string;
|
|
154
|
-
bytes?: number;
|
|
155
|
-
}
|
|
156
|
-
/** `GET /history/site` and `GET /history/pages/:slug` entries. */
|
|
157
|
-
interface HistoryEntry {
|
|
158
|
-
id: string;
|
|
159
|
-
at: string;
|
|
160
|
-
}
|
|
161
|
-
/** `POST /save`. At least one of `page` and `site`. */
|
|
162
|
-
interface SaveRequest<TPage = unknown, TSite = unknown> {
|
|
163
|
-
page?: {
|
|
164
|
-
/** Slug the page is stored under now. When `document.slug` differs, the page is renamed (or made home). */
|
|
165
|
-
from: string;
|
|
166
|
-
document: TPage;
|
|
167
|
-
/** Where the current home page moves when this page becomes `index`. Required when a home page exists. */
|
|
168
|
-
previousHomeSlug?: string;
|
|
169
|
-
};
|
|
170
|
-
site?: TSite;
|
|
171
|
-
}
|
|
172
|
-
/** `POST /save` response: the documents as stored. */
|
|
173
|
-
interface SaveResponse<TPage = unknown, TSite = unknown> {
|
|
174
|
-
page?: TPage;
|
|
175
|
-
site?: TSite;
|
|
176
|
-
}
|
|
177
|
-
/** `POST /pages`. `template` is a section type or the slug of a page to copy. */
|
|
178
|
-
interface CreatePageRequest {
|
|
179
|
-
slug: string;
|
|
180
|
-
title: string;
|
|
181
|
-
template?: string;
|
|
182
|
-
}
|
|
183
|
-
/** `POST /git/commit`. */
|
|
184
|
-
interface CommitRequest {
|
|
185
|
-
message: string;
|
|
186
|
-
paths?: string[];
|
|
187
|
-
}
|
|
188
|
-
interface CommitResult {
|
|
189
|
-
commit: string;
|
|
190
|
-
files: number;
|
|
191
|
-
}
|
|
192
|
-
/** `POST /preview/site`. */
|
|
193
|
-
interface SitePreview {
|
|
194
|
-
header: string;
|
|
195
|
-
footer: string;
|
|
196
|
-
}
|
|
197
|
-
//#endregion
|
|
198
97
|
//#region src/consent.d.ts
|
|
199
98
|
/** Longest copy the consent banner takes, in characters. The editor shows the same limits. */
|
|
200
99
|
export declare const CONSENT_LIMITS: {
|
|
@@ -305,4 +204,4 @@ interface ContrastCheck {
|
|
|
305
204
|
/** Text pairs a visitor reads: text on its background, label on the accent fill, link on its background. */
|
|
306
205
|
export declare function contrastChecks(colors: ThemeColors | undefined): ContrastCheck[];
|
|
307
206
|
//#endregion
|
|
308
|
-
export { API_PREFIX, type ApiIssue, type ApiProblem, BRAND_LOGO_HEIGHT, type BaseSection, type BooleanOption, type ButtonStyle, type ChangedFile, type CommitRequest, type CommitResult, type ConsentCopy, type ConsentReopen, type ConsentText, type ConsentTextKey, type ContentIssue, type ContentMigration, type ContentMigrator, type ContentModel, type ContentVersioning, type ContrastCheck, type CountRule, type CreatePageRequest, DEFAULT_MAX_FOOTER_COLUMNS, DEFAULT_MAX_HEADER_ACTIONS, type DocumentKind, type EnumOption, type FieldChoices, type FieldIcons, type FontMark, type Footer, type FooterColumn, type FooterConfig, type FormFieldErrors, type FormResult, type FormSubmission, type GitInfo, HONEYPOT_FIELD, type Header, type HeaderConfig, type HistoryEntry, type Image, type ImageFit, type ImagePosition, type JsonLdBlock, type JsonLdResult, type Link, MAX_NAV_DEPTH, type MediaSource, type NumberOption, type Option, type OptionalContent, type Page, type PageListItem, type PropsOf, type RichText, SCHEMA_VERSION_KEY, SYSTEM_PAGES, type SaveRequest, type SaveResponse, type SectionConfig, type SectionDefinition, type SectionOf, type SectionRegistry, type Seo, type ShowCondition, type ShowWhen, type Site, type SiteAnalytics, type SiteConfig, type SiteConsent, type SiteDefinition, type SiteJsonLdIds, type SiteJsonLdSource, type SiteOf, type SitePreview, type SitePreviewHtml, type SiteSeo, type SiteWith, type StringOption, TURNSTILE_FIELD, type Text, type TextMark, type TextRun, type Theme, type ThemeColors, type ThemeConfig, type ThemeDefinition, type ThemeFont, type ThemePreview, type Tone, type UploadedImage, type UploadedVideo, type WeightMark, type WireKind, type WireRect, type Wireframe, anchorSchema, applyTextMark, brandLogoSchema, buttonStyles, createMigrator, createPageSchema, createSectionSchema, defaultTheme, defineSection, defineSite, defineTheme, defineWireframe, fontMarks, formatJsonLd, generateSiteJsonLd, hasJsonLdId, htmlIdSchema, imageSchema, isPlaceholderSiteUrl, isSystemPage, jsonLdSchema, jsonLdWarnings, linkSchema, markClass, marksFromEmphasis, mergeJsonLd, motionOption, parseJsonLdInput, reconcileMarks, renderMarkedHtml, richTextSchema, sectionIdSchema, seoSchema, siteAnalyticsSchema, siteConsentSchema, siteJsonLdIds, siteSeoSchema, splitMarkedText, textMarkSchema, textSchema, themeColorsSchema, themeModes, themeSchema, toneOption, toneSchema, tones, trackingIdSchema, upsertJsonLd, variantOption, weightMarks, wireKinds, wireframeIssues, withEmphasis, withoutOrphanSections };
|
|
207
|
+
export { API_PREFIX, type ApiIssue, type ApiProblem, BRAND_LOGO_HEIGHT, type BaseSection, type BooleanOption, type ButtonStyle, type ChangedFile, type CollectionOptions, type CommitRequest, type CommitResult, type ConsentCopy, type ConsentReopen, type ConsentText, type ConsentTextKey, type ContentIssue, type ContentMigration, type ContentMigrator, type ContentModel, type ContentVersioning, type ContrastCheck, type CountRule, type CreatePageRequest, DEFAULT_MAX_FOOTER_COLUMNS, DEFAULT_MAX_HEADER_ACTIONS, type DocumentKind, type EnumOption, type FieldChoices, type FieldIcons, type FontMark, type Footer, type FooterColumn, type FooterConfig, type FormFieldErrors, type FormResult, type FormSubmission, type GitInfo, HONEYPOT_FIELD, type Header, type HeaderConfig, type HistoryEntry, type Image, type ImageFit, type ImagePosition, type JsonLdBlock, type JsonLdResult, type Link, MAX_NAV_DEPTH, type MediaSource, type NumberOption, type Option, type OptionalContent, type Page, type PageListItem, type PropsOf, type RichText, SCHEMA_VERSION_KEY, SYSTEM_PAGES, type SaveRequest, type SaveResponse, type SectionConfig, type SectionDefinition, type SectionOf, type SectionRegistry, type Seo, type ShowCondition, type ShowWhen, type Site, type SiteAnalytics, type SiteConfig, type SiteConsent, type SiteDefinition, type SiteJsonLdIds, type SiteJsonLdSource, type SiteOf, type SitePreview, type SitePreviewHtml, type SiteSeo, type SiteWith, type StringOption, TURNSTILE_FIELD, type Text, type TextMark, type TextRun, type Theme, type ThemeColors, type ThemeConfig, type ThemeDefinition, type ThemeFont, type ThemePreview, type Tone, type UploadedImage, type UploadedVideo, type WeightMark, type WireKind, type WireRect, type Wireframe, anchorSchema, applyTextMark, brandLogoSchema, buttonStyles, collection, createMigrator, createPageSchema, createSectionSchema, defaultTheme, defineSection, defineSite, defineTheme, defineWireframe, fontMarks, formatJsonLd, generateSiteJsonLd, hasJsonLdId, htmlIdSchema, imageSchema, isPlaceholderSiteUrl, isSystemPage, jsonLdSchema, jsonLdWarnings, linkSchema, markClass, marksFromEmphasis, mergeJsonLd, motionOption, parseJsonLdInput, reconcileMarks, renderMarkedHtml, richTextSchema, sectionIdSchema, seoSchema, siteAnalyticsSchema, siteConsentSchema, siteJsonLdIds, siteSeoSchema, splitMarkedText, textMarkSchema, textSchema, themeColorsSchema, themeModes, themeSchema, toneOption, toneSchema, tones, trackingIdSchema, upsertJsonLd, variantOption, weightMarks, wireKinds, wireframeIssues, withEmphasis, withoutOrphanSections };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as enumFields, D as ContentReadError, E as ContentError, O as ContentValidationError, T as schemaProps, k as formatContentIssues, t as collection, x as defineThemePreview } from "./collections-BbL4_4jt.js";
|
|
2
2
|
import { n as defineTheme, t as defaultTheme } from "./theme-BvqJ8UnS.js";
|
|
3
3
|
import { A as textMarkSchema, B as isImagePosition, C as upsertJsonLd, D as imageSchema, E as htmlIdSchema, F as DEFAULT_IMAGE_FIT, G as toneOption, H as buttonStyles, I as DEFAULT_IMAGE_POSITION, K as tones, L as IMAGE_FITS, M as toneSchema, N as trackingIdSchema, O as linkSchema, P as withEmphasis, R as IMAGE_POSITIONS, S as siteJsonLdIds, T as addMarkIssues, U as motionOption, W as themeModes, _ as isPlaceholderSiteUrl, b as mergeJsonLd, c as withoutOrphanSections, f as sectionIdSchema, g as hasJsonLdId, h as generateSiteJsonLd, i as isSystemPage, j as textSchema, k as richTextSchema, l as anchorSchema, m as formatJsonLd, n as createPageSchema, o as seoSchema, p as walkLinkIds, q as variantOption, t as SYSTEM_PAGES, u as createSectionSchema, v as jsonLdSchema, w as MAX_NAV_DEPTH, x as parseJsonLdInput, y as jsonLdWarnings, z as isImageFit } from "./page-wlcQJAA-.js";
|
|
4
4
|
import { d as reconcileMarks, f as renderMarkedHtml, i as fontMarks, l as marksFromEmphasis, m as weightMarks, p as splitMarkedText, s as markClass, t as applyTextMark } from "./marks-DPBilumg.js";
|
|
@@ -443,4 +443,4 @@ function defineSite(config) {
|
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
445
|
//#endregion
|
|
446
|
-
export { API_PREFIX, BRAND_LOGO_HEIGHT, CONSENT_COPY, CONSENT_HREF, CONSENT_LIMITS, CONSENT_REOPEN, ContentError, ContentReadError, ContentValidationError, DEFAULT_IMAGE_FIT, DEFAULT_IMAGE_POSITION, DEFAULT_MAX_FOOTER_COLUMNS, DEFAULT_MAX_HEADER_ACTIONS, HEX_COLOR, HONEYPOT_FIELD, IMAGE_FITS, IMAGE_POSITIONS, MAX_NAV_DEPTH, SCHEMA_VERSION_KEY, SYSTEM_PAGES, TURNSTILE_FIELD, VIDEO_FILE, anchorSchema, applyTextMark, brandLogoSchema, buttonStyles, consentCopy, consentTextIssues, contrastChecks, contrastRatio, createMigrator, createPageSchema, createSectionSchema, defaultTheme, defineSection, defineSite, defineTheme, defineThemePreview, defineWireframe, derivePalette, fontMarks, formatJsonLd, generateSiteJsonLd, hasJsonLdId, hasOverrides, hasThemeColors, hexToToken, htmlIdSchema, imageSchema, isImageFit, isImagePosition, isPlaceholderSiteUrl, isSystemPage, jsonLdSchema, jsonLdWarnings, linkSchema, markClass, marksFromEmphasis, mergeJsonLd, motionOption, parseJsonLdInput, parseMediaSource, reconcileMarks, renderMarkedHtml, richTextSchema, sectionIdSchema, seoSchema, siteAnalyticsSchema, siteConsentSchema, siteJsonLdIds, siteSeoSchema, splitMarkedText, textMarkSchema, textSchema, themeColorsSchema, themeCss, themeModes, themeSchema, tokenToHex, toneOption, toneSchema, tones, trackingIdSchema, upsertJsonLd, variantOption, weightMarks, wireKinds, wireframeIssues, withEmphasis, withoutOrphanSections };
|
|
446
|
+
export { API_PREFIX, BRAND_LOGO_HEIGHT, CONSENT_COPY, CONSENT_HREF, CONSENT_LIMITS, CONSENT_REOPEN, ContentError, ContentReadError, ContentValidationError, DEFAULT_IMAGE_FIT, DEFAULT_IMAGE_POSITION, DEFAULT_MAX_FOOTER_COLUMNS, DEFAULT_MAX_HEADER_ACTIONS, HEX_COLOR, HONEYPOT_FIELD, IMAGE_FITS, IMAGE_POSITIONS, MAX_NAV_DEPTH, SCHEMA_VERSION_KEY, SYSTEM_PAGES, TURNSTILE_FIELD, VIDEO_FILE, anchorSchema, applyTextMark, brandLogoSchema, buttonStyles, collection, consentCopy, consentTextIssues, contrastChecks, contrastRatio, createMigrator, createPageSchema, createSectionSchema, defaultTheme, defineSection, defineSite, defineTheme, defineThemePreview, defineWireframe, derivePalette, fontMarks, formatJsonLd, generateSiteJsonLd, hasJsonLdId, hasOverrides, hasThemeColors, hexToToken, htmlIdSchema, imageSchema, isImageFit, isImagePosition, isPlaceholderSiteUrl, isSystemPage, jsonLdSchema, jsonLdWarnings, linkSchema, markClass, marksFromEmphasis, mergeJsonLd, motionOption, parseJsonLdInput, parseMediaSource, reconcileMarks, renderMarkedHtml, richTextSchema, sectionIdSchema, seoSchema, siteAnalyticsSchema, siteConsentSchema, siteJsonLdIds, siteSeoSchema, splitMarkedText, textMarkSchema, textSchema, themeColorsSchema, themeCss, themeModes, themeSchema, tokenToHex, toneOption, toneSchema, tones, trackingIdSchema, upsertJsonLd, variantOption, weightMarks, wireKinds, wireframeIssues, withEmphasis, withoutOrphanSections };
|