@marktiderman/genesis-sites 0.6.1 → 0.7.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.
Files changed (50) hide show
  1. package/README.md +23 -2
  2. package/SKILL.md +5 -1
  3. package/dist/assets/{form-island.7bd31cce05.js → form-island.c28e464326.js} +3 -3
  4. package/dist/assets/{islands.ee3511d602.js → islands.7cc682fc1f.js} +1 -1
  5. package/dist/assets/sites-forms.1559674309.css +10 -0
  6. package/dist/assets/sites-forms.css +1 -1
  7. package/dist/assets/sites.7108ff951d.css +2 -0
  8. package/dist/assets/sites.css +1 -1
  9. package/dist/assets.generated-QJK3COCH.js +3 -0
  10. package/dist/{assets.generated-4XWKKLCZ.js.map → assets.generated-QJK3COCH.js.map} +1 -1
  11. package/dist/{chunk-JXIKG55Y.js → chunk-5LEY4UFU.js} +6 -6
  12. package/dist/{chunk-JXIKG55Y.js.map → chunk-5LEY4UFU.js.map} +1 -1
  13. package/dist/{chunk-YAASBQTJ.js → chunk-IU6AI75R.js} +10 -3
  14. package/dist/chunk-IU6AI75R.js.map +1 -0
  15. package/dist/{chunk-FFFP5DH6.js → chunk-KY4ALBVH.js} +43 -4
  16. package/dist/chunk-KY4ALBVH.js.map +1 -0
  17. package/dist/{chunk-RSU5VL44.js → chunk-SMJMXQ3T.js} +3 -3
  18. package/dist/{chunk-RSU5VL44.js.map → chunk-SMJMXQ3T.js.map} +1 -1
  19. package/dist/chunk-TPBKCLES.js +19 -0
  20. package/dist/chunk-TPBKCLES.js.map +1 -0
  21. package/dist/{chunk-P6LQDETQ.js → chunk-VJ4HOFBA.js} +3 -3
  22. package/dist/{chunk-P6LQDETQ.js.map → chunk-VJ4HOFBA.js.map} +1 -1
  23. package/dist/editor.d.ts +76 -6
  24. package/dist/editor.js +545 -129
  25. package/dist/editor.js.map +1 -1
  26. package/dist/handler-VQ4QKTUU.js +10 -0
  27. package/dist/{handler-LD32KEDP.js.map → handler-VQ4QKTUU.js.map} +1 -1
  28. package/dist/import.d.ts +3 -3
  29. package/dist/index.d.ts +45 -6
  30. package/dist/index.js +3 -3
  31. package/dist/{registry-CeSBSfU8.d.ts → registry-BIijndsq.d.ts} +7 -1
  32. package/dist/sections.d.ts +1 -1
  33. package/dist/sections.js +2 -2
  34. package/dist/{store-CUsfzNmK.d.ts → store-BImtGmoF.d.ts} +2 -2
  35. package/dist/supabase.d.ts +4 -4
  36. package/dist/supabase.js +3 -3
  37. package/dist/{templates-DALVa71A.d.ts → templates-kA-jrnWA.d.ts} +2 -2
  38. package/dist/templates.d.ts +3 -3
  39. package/dist/{theme-B3Vh_b-P.d.ts → theme-Cg-inpk5.d.ts} +1 -1
  40. package/dist/web.d.ts +6 -6
  41. package/dist/web.js +5 -5
  42. package/package.json +6 -6
  43. package/dist/assets/sites-forms.e7b97e8ede.css +0 -10
  44. package/dist/assets/sites.debee7c477.css +0 -2
  45. package/dist/assets.generated-4XWKKLCZ.js +0 -3
  46. package/dist/chunk-FFFP5DH6.js.map +0 -1
  47. package/dist/chunk-O6LTQZRQ.js +0 -19
  48. package/dist/chunk-O6LTQZRQ.js.map +0 -1
  49. package/dist/chunk-YAASBQTJ.js.map +0 -1
  50. package/dist/handler-LD32KEDP.js +0 -10
package/README.md CHANGED
@@ -634,11 +634,32 @@ What it does:
634
634
  unmounts with changes still waiting it saves them on the way out, but it
635
635
  can't wait for that save, so a host that must not lose them asks first.
636
636
  Undo and redo are Puck's history (the toolbar, or Ctrl+Z and Ctrl+Shift+Z).
637
- - **Pages**: open, add (blank, the landing page from your brand, or a starter
638
- site page), change an address (the old one redirects with a 301; reserved
637
+ - **Pages**: open, add (blank or a starter site page), change an address (the old one redirects with a 301; reserved
639
638
  paths are refused), delete, and edit the header menu. Reordering pages
640
639
  needs a store with `reorderPages(siteId, pageIds)`; without it the list is
641
640
  in the store's order.
641
+ - **Landing pages** have their own section in the Pages tab: the site's
642
+ pages of kind `landing` other than the home page (`isLandingPage`: a
643
+ one-click landing site's `/` stays among the pages), each with its address and whether the live
644
+ release has it (Published or Draft). **New landing page** asks a title and
645
+ an address and makes the landing page from your brand at
646
+ `<directory>/<address>`, opened in the same canvas; it isn't added to the
647
+ menu, and the menu editor doesn't suggest landing pages. A landing page
648
+ can change its address within the directory (the old one redirects) or be
649
+ deleted, and it is edited, previewed, checked and published exactly like
650
+ any other page, in the same release. The directory is the site's
651
+ `landing.directory` (unset: `/go`, `DEFAULT_LANDING_DIRECTORY`), a page
652
+ path other than `/` that isn't reserved. **Change the directory** sets it, and offers to
653
+ move the landing pages already under the old one (each old address
654
+ redirects); without that, they keep their addresses and only new landing
655
+ pages use the new directory. A move onto the old address of another
656
+ landing page that is also moving is refused before anything moves, so
657
+ every old address keeps redirecting to its page. The moves aren't one
658
+ transaction: if one fails, `LandingDirectoryError` lists the pages that
659
+ moved (`moved`), and making the same change again finishes it. The same steps without the editor are
660
+ `createLandingPage`, `moveLandingPage` and `setLandingDirectory` from
661
+ `/editor`; `landingDirectory`, `landingPath` and `landingSlugProblems`
662
+ are in the root.
642
663
  - **Publish**: the publish checks run on the saved drafts and errors block
643
664
  the button. While a publish runs the canvas is read-only and autosave
644
665
  waits, so no edit races the store's own re-saves; afterwards the editor
package/SKILL.md CHANGED
@@ -32,7 +32,7 @@ Then, as `genesis add` prints:
32
32
  | The built-in sections | `@marktiderman/genesis-sites/sections` |
33
33
  | Serving: `handleSiteRequest` | `@marktiderman/genesis-sites/web` |
34
34
  | The Supabase store | `@marktiderman/genesis-sites/supabase` |
35
- | The visual editor, `<SiteEditor>` | `@marktiderman/genesis-sites/editor` |
35
+ | The visual editor, `<SiteEditor>`, and landing pages (`createLandingPage`, `setLandingDirectory`) | `@marktiderman/genesis-sites/editor` |
36
36
  | Importing an old site's assets (Node) | `@marktiderman/genesis-sites/import` |
37
37
 
38
38
  ## Rules
@@ -42,5 +42,9 @@ Then, as `genesis add` prints:
42
42
  - Forms on a page embed Genesis Forms (the `forms` primitive); don't build a contact form by hand.
43
43
  - Never write to `genesis_sites` from outside the module's functions: the schema is the module's.
44
44
  - Which plan unlocks Sites is the app's call, in its own `features.ts`.
45
+ - A campaign page is a landing page (kind `landing`) under the site's landing directory
46
+ (`landing.directory`, `/go` by default), made in the editor's Landing pages section or with
47
+ `createLandingPage`; it is a page like any other, edited and published in the same editor and
48
+ release, never a second builder.
45
49
 
46
50
  Details: the package README and [docs/SITES.md](https://github.com/marktiderman/genesis/blob/main/docs/SITES.md).