@growth-labs/cms 0.1.1 → 0.1.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 +6 -2
- package/dist/engine/publisher.d.ts +14 -3
- package/dist/engine/publisher.d.ts.map +1 -1
- package/dist/engine/publisher.js +11 -5
- package/dist/engine/publisher.js.map +1 -1
- package/dist/routes/content.d.ts +1 -1
- package/dist/routes/content.d.ts.map +1 -1
- package/dist/routes/content.js +30 -23
- package/dist/routes/content.js.map +1 -1
- package/dist/schema/insights-ingest.d.ts +16 -16
- package/dist/schema/migrations.d.ts +5 -3
- package/dist/schema/migrations.d.ts.map +1 -1
- package/dist/schema/migrations.js +148 -4
- package/dist/schema/migrations.js.map +1 -1
- package/dist/schema/types.d.ts +2 -2
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/ui/commands.d.ts +2 -1
- package/dist/ui/commands.d.ts.map +1 -1
- package/dist/ui/commands.js +1 -2
- package/dist/ui/commands.js.map +1 -1
- package/dist/ui/components/SharePickers.d.ts.map +1 -1
- package/dist/ui/components/SharePickers.js +11 -7
- package/dist/ui/components/SharePickers.js.map +1 -1
- package/dist/ui/editor/ContentForm.d.ts +1 -1
- package/dist/ui/editor/ContentForm.d.ts.map +1 -1
- package/dist/ui/editor/ContentForm.js +5 -5
- package/dist/ui/editor/ContentForm.js.map +1 -1
- package/dist/ui/editor/content-payload.js +2 -2
- package/dist/ui/editor/content-payload.js.map +1 -1
- package/dist/ui/preview/draft-page.js +5 -4
- package/dist/ui/preview/draft-page.js.map +1 -1
- package/dist/ui/screens/EditorScreen.d.ts.map +1 -1
- package/dist/ui/screens/EditorScreen.js +2 -0
- package/dist/ui/screens/EditorScreen.js.map +1 -1
- package/dist/ui/screens/LibraryScreen.d.ts.map +1 -1
- package/dist/ui/screens/LibraryScreen.js +4 -2
- package/dist/ui/screens/LibraryScreen.js.map +1 -1
- package/dist/ui/screens/SocialShareScreen.js +1 -1
- package/dist/ui/screens/SocialShareScreen.js.map +1 -1
- package/dist/ui/screens/content-view.d.ts +2 -1
- package/dist/ui/screens/content-view.d.ts.map +1 -1
- package/dist/ui/screens/content-view.js.map +1 -1
- package/dist/ui/screens/public-url.d.ts.map +1 -1
- package/dist/ui/screens/public-url.js +2 -0
- package/dist/ui/screens/public-url.js.map +1 -1
- package/migrations/0001_create_cms_tables.sql +4 -4
- package/migrations/0017_content_pages.sql +138 -0
- package/package.json +1 -1
- package/src/engine/publisher.ts +45 -9
- package/src/routes/content.ts +40 -26
- package/src/schema/migrations.ts +148 -4
- package/src/schema/types.ts +2 -2
- package/src/ui/commands.ts +3 -1
- package/src/ui/components/SharePickers.tsx +13 -10
- package/src/ui/editor/ContentForm.tsx +7 -7
- package/src/ui/editor/content-payload.ts +2 -2
- package/src/ui/preview/draft-page.tsx +7 -4
- package/src/ui/screens/EditorScreen.tsx +2 -0
- package/src/ui/screens/LibraryScreen.tsx +4 -2
- package/src/ui/screens/SocialShareScreen.tsx +1 -0
- package/src/ui/screens/content-view.ts +3 -1
- package/src/ui/screens/public-url.ts +2 -0
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// ContentRoute owns a ContentView state; dispatching actions moves between the
|
|
3
3
|
// library list (open === null) and the editor (open !== null).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import type { ContentType } from '../../schema/types.js'
|
|
6
|
+
|
|
7
|
+
export type { ContentType } from '../../schema/types.js'
|
|
6
8
|
|
|
7
9
|
export interface ContentView {
|
|
8
10
|
/** null = create new; string = open existing by id */
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
// video → /video/<slug> (src/pages/video/[slug].astro)
|
|
11
11
|
// newsletter → /warfronts-weekly/<slug>
|
|
12
12
|
// (src/pages/warfronts-weekly/[slug].astro)
|
|
13
|
+
// page → /<slug>
|
|
13
14
|
//
|
|
14
15
|
// SOURCE OF TRUTH for the path scheme: the Fronts site page structure at
|
|
15
16
|
// /Users/zephyr/projects/fulcrum-labs/fronts/src/pages/
|
|
@@ -44,6 +45,7 @@ const CONTENT_PUBLIC_PATH: Record<ContentType, (slug: string) => string> = {
|
|
|
44
45
|
// SOURCE: fronts/src/pages/warfronts-weekly/[slug].astro
|
|
45
46
|
// fronts/src/lib/content.ts ~L779
|
|
46
47
|
newsletter: (slug) => `/warfronts-weekly/${slug}`,
|
|
48
|
+
page: (slug) => `/${slug.replace(/^\/+/, '')}`,
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
// ---------------------------------------------------------------------------
|