@marktiderman/genesis-sites 0.6.1 → 0.6.2
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/README.md +23 -2
- package/SKILL.md +5 -1
- package/dist/assets/{form-island.7bd31cce05.js → form-island.c28e464326.js} +3 -3
- package/dist/assets/{islands.ee3511d602.js → islands.7cc682fc1f.js} +1 -1
- package/dist/assets/sites-forms.1559674309.css +10 -0
- package/dist/assets/sites-forms.css +1 -1
- package/dist/assets/sites.7108ff951d.css +2 -0
- package/dist/assets/sites.css +1 -1
- package/dist/assets.generated-QJK3COCH.js +3 -0
- package/dist/{assets.generated-4XWKKLCZ.js.map → assets.generated-QJK3COCH.js.map} +1 -1
- package/dist/{chunk-JXIKG55Y.js → chunk-5LEY4UFU.js} +6 -6
- package/dist/{chunk-JXIKG55Y.js.map → chunk-5LEY4UFU.js.map} +1 -1
- package/dist/{chunk-YAASBQTJ.js → chunk-IU6AI75R.js} +10 -3
- package/dist/chunk-IU6AI75R.js.map +1 -0
- package/dist/{chunk-FFFP5DH6.js → chunk-KY4ALBVH.js} +43 -4
- package/dist/chunk-KY4ALBVH.js.map +1 -0
- package/dist/{chunk-RSU5VL44.js → chunk-SMJMXQ3T.js} +3 -3
- package/dist/{chunk-RSU5VL44.js.map → chunk-SMJMXQ3T.js.map} +1 -1
- package/dist/chunk-TPBKCLES.js +19 -0
- package/dist/chunk-TPBKCLES.js.map +1 -0
- package/dist/{chunk-P6LQDETQ.js → chunk-VJ4HOFBA.js} +3 -3
- package/dist/{chunk-P6LQDETQ.js.map → chunk-VJ4HOFBA.js.map} +1 -1
- package/dist/editor.d.ts +76 -6
- package/dist/editor.js +545 -129
- package/dist/editor.js.map +1 -1
- package/dist/handler-VQ4QKTUU.js +10 -0
- package/dist/{handler-LD32KEDP.js.map → handler-VQ4QKTUU.js.map} +1 -1
- package/dist/import.d.ts +3 -3
- package/dist/index.d.ts +45 -6
- package/dist/index.js +3 -3
- package/dist/{registry-CeSBSfU8.d.ts → registry-BIijndsq.d.ts} +7 -1
- package/dist/sections.d.ts +1 -1
- package/dist/sections.js +2 -2
- package/dist/{store-CUsfzNmK.d.ts → store-BImtGmoF.d.ts} +2 -2
- package/dist/supabase.d.ts +4 -4
- package/dist/supabase.js +3 -3
- package/dist/{templates-DALVa71A.d.ts → templates-kA-jrnWA.d.ts} +2 -2
- package/dist/templates.d.ts +3 -3
- package/dist/{theme-B3Vh_b-P.d.ts → theme-Cg-inpk5.d.ts} +1 -1
- package/dist/web.d.ts +6 -6
- package/dist/web.js +5 -5
- package/package.json +6 -6
- package/dist/assets/sites-forms.e7b97e8ede.css +0 -10
- package/dist/assets/sites.debee7c477.css +0 -2
- package/dist/assets.generated-4XWKKLCZ.js +0 -3
- package/dist/chunk-FFFP5DH6.js.map +0 -1
- package/dist/chunk-O6LTQZRQ.js +0 -19
- package/dist/chunk-O6LTQZRQ.js.map +0 -1
- package/dist/chunk-YAASBQTJ.js.map +0 -1
- package/dist/handler-LD32KEDP.js +0 -10
package/dist/editor.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { P as
|
|
3
|
-
import { B as BrandInput } from './theme-
|
|
4
|
-
import { A as Asset, a as AssetMeta, S as SiteStore, b as SiteIssue, P as PublishOptions, R as ReservedPaths, c as SaveResult } from './store-
|
|
2
|
+
import { P as PageMeta, a as PageKind, b as PageDoc, R as Release, F as FormsResolver, c as RenderContext, d as ResolvedForm, S as SectionCategory, A as AnySectionDefinition, e as Seo, f as SectionNode, g as SiteDoc } from './registry-BIijndsq.js';
|
|
3
|
+
import { B as BrandInput } from './theme-Cg-inpk5.js';
|
|
4
|
+
import { A as Asset, a as AssetMeta, S as SiteStore, b as SiteIssue, P as PublishOptions, R as ReservedPaths, c as SaveResult } from './store-BImtGmoF.js';
|
|
5
5
|
import { Config, Fields, Overrides } from '@puckeditor/core';
|
|
6
6
|
export { Config as PuckConfig, Data as PuckData, Overrides as PuckOverrides, createUsePuck, usePuck } from '@puckeditor/core';
|
|
7
7
|
import '@marktiderman/genesis-media';
|
|
@@ -92,8 +92,78 @@ interface PageTemplate {
|
|
|
92
92
|
* @stability Beta
|
|
93
93
|
*/
|
|
94
94
|
declare function pageTemplates(): PageTemplate[];
|
|
95
|
-
/**
|
|
96
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Move one page up or down the list (through `reorderPages`, when the store has it). `within`
|
|
97
|
+
* limits the list being reordered (the Pages panel's own pages, not the landing pages): the page
|
|
98
|
+
* swaps with the next one that passes it.
|
|
99
|
+
*/
|
|
100
|
+
declare function movePageInList(store: EditorSiteStore, siteId: string, pageId: string, by: -1 | 1, options?: {
|
|
101
|
+
within?: (page: PageMeta) => boolean;
|
|
102
|
+
}): Promise<PageMeta[]>;
|
|
103
|
+
/**
|
|
104
|
+
* Make a landing page: the brand's landing page template (kind `landing`) at
|
|
105
|
+
* `<directory>/<slug>`, under the site's landing directory. It isn't added to
|
|
106
|
+
* the menu. Refuses a slug, reserved path or taken address before asking the
|
|
107
|
+
* store.
|
|
108
|
+
*
|
|
109
|
+
* @stability Beta
|
|
110
|
+
*/
|
|
111
|
+
declare function createLandingPage(store: SiteStore, siteId: string, input: {
|
|
112
|
+
title: string;
|
|
113
|
+
slug: string;
|
|
114
|
+
brand: BrandInput;
|
|
115
|
+
reserved?: ReservedPaths;
|
|
116
|
+
}): Promise<PageMeta>;
|
|
117
|
+
/**
|
|
118
|
+
* Give a landing page a new slug under the site's landing directory (a page
|
|
119
|
+
* outside the directory moves into it). The old address redirects (301), as
|
|
120
|
+
* for any page move.
|
|
121
|
+
*
|
|
122
|
+
* @stability Beta
|
|
123
|
+
*/
|
|
124
|
+
declare function moveLandingPage(store: SiteStore, pageId: string, slug: string, options?: {
|
|
125
|
+
reserved?: ReservedPaths;
|
|
126
|
+
}): Promise<PageMeta>;
|
|
127
|
+
/**
|
|
128
|
+
* Change where new landing pages go (`site.landing.directory`). With
|
|
129
|
+
* `movePages`, every landing page under the old directory moves to the same
|
|
130
|
+
* slug under the new one, and its old address redirects (301); every new
|
|
131
|
+
* address is checked before anything moves. Without it, existing pages keep
|
|
132
|
+
* their addresses and only new landing pages use the new directory.
|
|
133
|
+
*
|
|
134
|
+
* The moves and the save are separate store calls, not one transaction. If
|
|
135
|
+
* one fails partway, it throws a `LandingDirectoryError` whose `moved` lists
|
|
136
|
+
* the pages that already moved (its message names them); running the same
|
|
137
|
+
* change again finishes it (the pages still under the old directory move,
|
|
138
|
+
* and the directory is saved). The final save re-reads the site and tries
|
|
139
|
+
* once more when someone saved it meanwhile, then throws
|
|
140
|
+
* `SiteConflictError` (as the `cause` of a `LandingDirectoryError` when
|
|
141
|
+
* pages had already moved).
|
|
142
|
+
*
|
|
143
|
+
* A move onto the old address of another landing page that is also moving
|
|
144
|
+
* is refused before anything moves: that address must keep redirecting to
|
|
145
|
+
* the page that had it.
|
|
146
|
+
*
|
|
147
|
+
* @stability Beta
|
|
148
|
+
*/
|
|
149
|
+
declare function setLandingDirectory(store: SiteStore, siteId: string, directory: string, options?: {
|
|
150
|
+
movePages?: boolean;
|
|
151
|
+
reserved?: ReservedPaths;
|
|
152
|
+
}): Promise<{
|
|
153
|
+
directory: string;
|
|
154
|
+
moved: PageMeta[];
|
|
155
|
+
}>;
|
|
156
|
+
/**
|
|
157
|
+
* `setLandingDirectory` stopped after moving some landing pages: `moved`
|
|
158
|
+
* lists them (their old addresses already redirect), and `cause` is what
|
|
159
|
+
* stopped it. Running the same change again finishes it.
|
|
160
|
+
*
|
|
161
|
+
* @stability Beta
|
|
162
|
+
*/
|
|
163
|
+
declare class LandingDirectoryError extends Error {
|
|
164
|
+
readonly moved: PageMeta[];
|
|
165
|
+
constructor(moved: PageMeta[], cause: unknown);
|
|
166
|
+
}
|
|
97
167
|
|
|
98
168
|
/**
|
|
99
169
|
* `<SiteEditor>`: the visual editor for a genesis-sites site.
|
|
@@ -528,4 +598,4 @@ interface GenesisOverrideOptions {
|
|
|
528
598
|
}
|
|
529
599
|
declare function genesisOverrides(info: ReadonlyMap<string, ComponentInfo>, extra?: Partial<Overrides>, options?: GenesisOverrideOptions): Partial<Overrides>;
|
|
530
600
|
|
|
531
|
-
export { AssetPicker, type AssetPickerProps, AutosaveBlockedError, type AutosaveState, type AutosaveStatus, Autosaver, type AutosaverOptions, type CanvasMetadata, type ComponentInfo, type EditorAssets, type EditorConfig, type EditorConfigOptions, type EditorData, type EditorRootProps, type EditorSiteStore, type FromEditorResult, IMAGE_TYPES, NODE_KEYS, type PageTemplate, type PickedImage, type PreviewInput, type PreviewResult, type PuckItem, type SectionFields, type SiteCheck, SiteEditor, type SiteEditorProps, checkSite, countTypes, createEditorConfig, fromEditorData, genesisOverrides, h1SectionId, humanize, itemToNode, movePageInList, nodeToItem, pageTemplates, pathProblems, placeholderSnapshot, presetComponentName, pruneEmpty, publishSite, renamePage, renderPreview, safeSectionId, sectionFields, sectionTypeOf, slugify, toEditorData, uploadProblem };
|
|
601
|
+
export { AssetPicker, type AssetPickerProps, AutosaveBlockedError, type AutosaveState, type AutosaveStatus, Autosaver, type AutosaverOptions, type CanvasMetadata, type ComponentInfo, type EditorAssets, type EditorConfig, type EditorConfigOptions, type EditorData, type EditorRootProps, type EditorSiteStore, type FromEditorResult, IMAGE_TYPES, LandingDirectoryError, NODE_KEYS, type PageTemplate, type PickedImage, type PreviewInput, type PreviewResult, type PuckItem, type SectionFields, type SiteCheck, SiteEditor, type SiteEditorProps, checkSite, countTypes, createEditorConfig, createLandingPage, fromEditorData, genesisOverrides, h1SectionId, humanize, itemToNode, moveLandingPage, movePageInList, nodeToItem, pageTemplates, pathProblems, placeholderSnapshot, presetComponentName, pruneEmpty, publishSite, renamePage, renderPreview, safeSectionId, sectionFields, sectionTypeOf, setLandingDirectory, slugify, toEditorData, uploadProblem };
|