ampless 0.2.0-alpha.2 → 0.2.0-alpha.3
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/dist/index.d.ts +26 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -166,7 +166,31 @@ interface AmplessPlugin {
|
|
|
166
166
|
}
|
|
167
167
|
declare function definePlugin(p: AmplessPlugin): AmplessPlugin;
|
|
168
168
|
|
|
169
|
-
type ContentFormat = 'tiptap' | 'markdown' | 'html';
|
|
169
|
+
type ContentFormat = 'tiptap' | 'markdown' | 'html' | 'static';
|
|
170
|
+
/**
|
|
171
|
+
* Body shape for `format: 'static'` posts. The actual asset bytes
|
|
172
|
+
* live under S3 at `public/static/<siteId>/<slug>/<files...>` — the
|
|
173
|
+
* body here is the manifest describing which entrypoint to serve and
|
|
174
|
+
* which files are part of the bundle.
|
|
175
|
+
*
|
|
176
|
+
* Stored as JSON in the `body` column (same encoding pattern as the
|
|
177
|
+
* tiptap doc / html string / markdown string for the other formats).
|
|
178
|
+
*
|
|
179
|
+
* Hard constraint enforced at upload time: every asset must reference
|
|
180
|
+
* other assets in the bundle by **relative path** only. Absolute paths
|
|
181
|
+
* (`/foo`) and protocol-relative paths (`//cdn.example/foo`) inside
|
|
182
|
+
* referenced HTML / CSS are rejected so a bundle stays portable across
|
|
183
|
+
* any URL prefix without rewriting at serve time. See the admin's
|
|
184
|
+
* StaticUploader for the validation logic.
|
|
185
|
+
*/
|
|
186
|
+
interface StaticPostBody {
|
|
187
|
+
/** Relative path to the entrypoint inside the bundle (default 'index.html'). */
|
|
188
|
+
entrypoint: string;
|
|
189
|
+
/** Every file in the bundle (relative paths). Used for delete cleanup and admin display. */
|
|
190
|
+
files: string[];
|
|
191
|
+
/** ISO 8601 timestamp of the most recent upload. */
|
|
192
|
+
uploadedAt: string;
|
|
193
|
+
}
|
|
170
194
|
type PostStatus = 'draft' | 'published';
|
|
171
195
|
/**
|
|
172
196
|
* Free-form per-post metadata. The `metadata` JSON column carries
|
|
@@ -666,4 +690,4 @@ declare function resolveThemeValues(manifest: ThemeManifest, stored: Record<stri
|
|
|
666
690
|
|
|
667
691
|
declare const VERSION = "0.0.1";
|
|
668
692
|
|
|
669
|
-
export { type AmplessEvent, type AmplessPlugin, type AuthContext, type Config, type ContentEventPayload, type ContentEventType, type ContentFormat, type ContentTypeDefinition, type CreatePostInput, DEFAULT_SITE_ID, type DateFormat, type EventPayloadOf, type EventType, type FieldDefinition, type FieldType, type ImageDisplay, type KvItem, type KvStore, type LinkListItem, type ListOptions, type LocalizedString, type Media, type MediaEventPayload, type MediaEventType, type MediaProcessingDefaults, type OgImageConfig, type OgImageFont, type OgImageRenderContext, type Page, type PluginEventHandler, type PluginMetadata, type PluginRuntimeContext, type Post, type PostMetadata, type PostStatus, type PostsProvider, type Role, SITE_CONFIG_PK, type SiteConfig, type SiteSettingsEventPayload, type SiteSettingsEventType, type StreamEventName, type ThemeColorField, type ThemeField, type ThemeFieldType, type ThemeFontFamilyField, type ThemeImageField, type ThemeLengthField, type ThemeLinkListField, type ThemeManifest, type ThemeModule, type ThemeRouteContext, type ThemeSelectField, type ThemeTextField, type TrustLevel, VERSION, composeSiteIdSlug, composeSiteIdStatus, createPost, defineConfig, definePlugin, defineSchema, defineTheme, defineThemeModule, deletePost, deleteSiteSetting, detectContentEvents, escapeXml, extractFirstImageUrl, flattenSettings, formatDate, formatPublicAssetUrl, getPost, getPostById, getSiteSetting, hasKvStore, hasPostsProvider, isMultiSite, isTagListUrl, listPosts, listSiteSettings, parseLinkList, resolveLocalized, resolveSiteId, resolveThemeValues, setKvStore, setPostsProvider, setSiteSetting, siteFor, stringifyLinkList, themeSettingKey, unflattenSettings, updatePost, validateThemeValue };
|
|
693
|
+
export { type AmplessEvent, type AmplessPlugin, type AuthContext, type Config, type ContentEventPayload, type ContentEventType, type ContentFormat, type ContentTypeDefinition, type CreatePostInput, DEFAULT_SITE_ID, type DateFormat, type EventPayloadOf, type EventType, type FieldDefinition, type FieldType, type ImageDisplay, type KvItem, type KvStore, type LinkListItem, type ListOptions, type LocalizedString, type Media, type MediaEventPayload, type MediaEventType, type MediaProcessingDefaults, type OgImageConfig, type OgImageFont, type OgImageRenderContext, type Page, type PluginEventHandler, type PluginMetadata, type PluginRuntimeContext, type Post, type PostMetadata, type PostStatus, type PostsProvider, type Role, SITE_CONFIG_PK, type SiteConfig, type SiteSettingsEventPayload, type SiteSettingsEventType, type StaticPostBody, type StreamEventName, type ThemeColorField, type ThemeField, type ThemeFieldType, type ThemeFontFamilyField, type ThemeImageField, type ThemeLengthField, type ThemeLinkListField, type ThemeManifest, type ThemeModule, type ThemeRouteContext, type ThemeSelectField, type ThemeTextField, type TrustLevel, VERSION, composeSiteIdSlug, composeSiteIdStatus, createPost, defineConfig, definePlugin, defineSchema, defineTheme, defineThemeModule, deletePost, deleteSiteSetting, detectContentEvents, escapeXml, extractFirstImageUrl, flattenSettings, formatDate, formatPublicAssetUrl, getPost, getPostById, getSiteSetting, hasKvStore, hasPostsProvider, isMultiSite, isTagListUrl, listPosts, listSiteSettings, parseLinkList, resolveLocalized, resolveSiteId, resolveThemeValues, setKvStore, setPostsProvider, setSiteSetting, siteFor, stringifyLinkList, themeSettingKey, unflattenSettings, updatePost, validateThemeValue };
|