@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.
Files changed (62) hide show
  1. package/README.md +6 -2
  2. package/dist/engine/publisher.d.ts +14 -3
  3. package/dist/engine/publisher.d.ts.map +1 -1
  4. package/dist/engine/publisher.js +11 -5
  5. package/dist/engine/publisher.js.map +1 -1
  6. package/dist/routes/content.d.ts +1 -1
  7. package/dist/routes/content.d.ts.map +1 -1
  8. package/dist/routes/content.js +30 -23
  9. package/dist/routes/content.js.map +1 -1
  10. package/dist/schema/insights-ingest.d.ts +16 -16
  11. package/dist/schema/migrations.d.ts +5 -3
  12. package/dist/schema/migrations.d.ts.map +1 -1
  13. package/dist/schema/migrations.js +148 -4
  14. package/dist/schema/migrations.js.map +1 -1
  15. package/dist/schema/types.d.ts +2 -2
  16. package/dist/schema/types.d.ts.map +1 -1
  17. package/dist/ui/commands.d.ts +2 -1
  18. package/dist/ui/commands.d.ts.map +1 -1
  19. package/dist/ui/commands.js +1 -2
  20. package/dist/ui/commands.js.map +1 -1
  21. package/dist/ui/components/SharePickers.d.ts.map +1 -1
  22. package/dist/ui/components/SharePickers.js +11 -7
  23. package/dist/ui/components/SharePickers.js.map +1 -1
  24. package/dist/ui/editor/ContentForm.d.ts +1 -1
  25. package/dist/ui/editor/ContentForm.d.ts.map +1 -1
  26. package/dist/ui/editor/ContentForm.js +5 -5
  27. package/dist/ui/editor/ContentForm.js.map +1 -1
  28. package/dist/ui/editor/content-payload.js +2 -2
  29. package/dist/ui/editor/content-payload.js.map +1 -1
  30. package/dist/ui/preview/draft-page.js +5 -4
  31. package/dist/ui/preview/draft-page.js.map +1 -1
  32. package/dist/ui/screens/EditorScreen.d.ts.map +1 -1
  33. package/dist/ui/screens/EditorScreen.js +2 -0
  34. package/dist/ui/screens/EditorScreen.js.map +1 -1
  35. package/dist/ui/screens/LibraryScreen.d.ts.map +1 -1
  36. package/dist/ui/screens/LibraryScreen.js +4 -2
  37. package/dist/ui/screens/LibraryScreen.js.map +1 -1
  38. package/dist/ui/screens/SocialShareScreen.js +1 -1
  39. package/dist/ui/screens/SocialShareScreen.js.map +1 -1
  40. package/dist/ui/screens/content-view.d.ts +2 -1
  41. package/dist/ui/screens/content-view.d.ts.map +1 -1
  42. package/dist/ui/screens/content-view.js.map +1 -1
  43. package/dist/ui/screens/public-url.d.ts.map +1 -1
  44. package/dist/ui/screens/public-url.js +2 -0
  45. package/dist/ui/screens/public-url.js.map +1 -1
  46. package/migrations/0001_create_cms_tables.sql +4 -4
  47. package/migrations/0017_content_pages.sql +138 -0
  48. package/package.json +1 -1
  49. package/src/engine/publisher.ts +45 -9
  50. package/src/routes/content.ts +40 -26
  51. package/src/schema/migrations.ts +148 -4
  52. package/src/schema/types.ts +2 -2
  53. package/src/ui/commands.ts +3 -1
  54. package/src/ui/components/SharePickers.tsx +13 -10
  55. package/src/ui/editor/ContentForm.tsx +7 -7
  56. package/src/ui/editor/content-payload.ts +2 -2
  57. package/src/ui/preview/draft-page.tsx +7 -4
  58. package/src/ui/screens/EditorScreen.tsx +2 -0
  59. package/src/ui/screens/LibraryScreen.tsx +4 -2
  60. package/src/ui/screens/SocialShareScreen.tsx +1 -0
  61. package/src/ui/screens/content-view.ts +3 -1
  62. 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
- export type ContentType = 'article' | 'video' | 'podcast' | 'newsletter'
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
  // ---------------------------------------------------------------------------