@marktiderman/genesis-sites 0.4.0 → 0.5.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.
- package/README.md +155 -18
- package/SKILL.md +46 -0
- package/dist/assets/fonts/LICENSES.txt +1469 -0
- package/dist/assets/form-island.c521219f1b.js +51 -0
- package/dist/assets/{islands.a521d323d9.js → islands.f275dc88cb.js} +1 -1
- package/dist/assets/sites-forms.490d10e01b.css +10 -0
- package/dist/assets/sites-forms.css +1 -1
- package/dist/assets/sites.1a40b828a5.css +2 -0
- package/dist/assets/sites.css +1 -1
- package/dist/assets.generated-P7NPIZHO.js +3 -0
- package/dist/{assets.generated-WCOFU56J.js.map → assets.generated-P7NPIZHO.js.map} +1 -1
- package/dist/{chunk-P5MR34QQ.js → chunk-3XCKSU4Z.js} +143 -85
- package/dist/chunk-3XCKSU4Z.js.map +1 -0
- package/dist/chunk-BJ6NXVZI.js +19 -0
- package/dist/chunk-BJ6NXVZI.js.map +1 -0
- package/dist/{chunk-3VKTBE7S.js → chunk-MU2Z2C4F.js} +2 -2
- package/dist/{chunk-3VKTBE7S.js.map → chunk-MU2Z2C4F.js.map} +1 -1
- package/dist/chunk-OFJISW3T.js +3 -0
- package/dist/chunk-OFJISW3T.js.map +1 -0
- package/dist/{chunk-FBQF2L7O.js → chunk-VLY75P7W.js} +190 -40
- package/dist/chunk-VLY75P7W.js.map +1 -0
- package/dist/{chunk-KGB6XHPS.js → chunk-VMJ67LCW.js} +97 -28
- package/dist/chunk-VMJ67LCW.js.map +1 -0
- package/dist/{chunk-KPOX7D4S.js → chunk-XOM334IK.js} +5 -5
- package/dist/chunk-XOM334IK.js.map +1 -0
- package/dist/{chunk-ZGWGQGT2.js → chunk-YAASBQTJ.js} +35 -22
- package/dist/chunk-YAASBQTJ.js.map +1 -0
- package/dist/editor.d.ts +5 -3
- package/dist/editor.js +14 -10
- package/dist/editor.js.map +1 -1
- package/dist/fonts.generated-HTXRHNVY.js +4 -0
- package/dist/handler-ESFMOYYF.js +10 -0
- package/dist/{handler-G35AUOTG.js.map → handler-ESFMOYYF.js.map} +1 -1
- package/dist/import.d.ts +26 -62
- package/dist/import.js +11 -258
- package/dist/import.js.map +1 -1
- package/dist/index.d.ts +10 -95
- package/dist/index.js +5 -4
- package/dist/{registry-HBn1X60x.d.ts → registry-CeSBSfU8.d.ts} +187 -13
- package/dist/sections.d.ts +153 -30
- package/dist/sections.js +3 -3
- package/dist/{store-BXiZeZzH.d.ts → store-CUsfzNmK.d.ts} +42 -119
- package/dist/supabase.d.ts +5 -3
- package/dist/supabase.js +15 -6
- package/dist/supabase.js.map +1 -1
- package/dist/templates-DALVa71A.d.ts +92 -0
- package/dist/templates.d.ts +78 -0
- package/dist/templates.js +146 -0
- package/dist/templates.js.map +1 -0
- package/dist/theme-B3Vh_b-P.d.ts +136 -0
- package/dist/web.d.ts +72 -13
- package/dist/web.js +7 -6
- package/migrations/tests/0001_genesis_sites.test.sql +4 -4
- package/migrations/tests/0002_genesis_sites_posts.test.sql +2 -2
- package/package.json +67 -15
- package/dist/assets/form-island.ad67ee00c0.js +0 -51
- package/dist/assets/sites-forms.e506c7dda2.css +0 -10
- package/dist/assets/sites.716b4ac1a5.css +0 -2
- package/dist/assets.generated-WCOFU56J.js +0 -3
- package/dist/chunk-FBQF2L7O.js.map +0 -1
- package/dist/chunk-IZQCYZ3R.js +0 -18
- package/dist/chunk-IZQCYZ3R.js.map +0 -1
- package/dist/chunk-KGB6XHPS.js.map +0 -1
- package/dist/chunk-KPOX7D4S.js.map +0 -1
- package/dist/chunk-P5MR34QQ.js.map +0 -1
- package/dist/chunk-ZGWGQGT2.js.map +0 -1
- package/dist/handler-G35AUOTG.js +0 -9
package/dist/editor.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { P as PageKind, a as PageDoc, b as PageMeta, 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-
|
|
3
|
-
import {
|
|
2
|
+
import { P as PageKind, a as PageDoc, b as PageMeta, 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-CeSBSfU8.js';
|
|
3
|
+
import { B as BrandInput } from './theme-B3Vh_b-P.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-CUsfzNmK.js';
|
|
4
5
|
import { Config, Fields, Overrides } from '@puckeditor/core';
|
|
5
6
|
export { Config as PuckConfig, Data as PuckData, Overrides as PuckOverrides, createUsePuck, usePuck } from '@puckeditor/core';
|
|
7
|
+
import '@marktiderman/genesis-media';
|
|
6
8
|
import 'zod';
|
|
7
9
|
import '@marktiderman/genesis-design-system';
|
|
8
10
|
|
|
@@ -61,7 +63,7 @@ declare function pathProblems(path: string, pages: readonly Pick<PageMeta, "id"
|
|
|
61
63
|
reserved?: ReservedPaths;
|
|
62
64
|
except?: string;
|
|
63
65
|
}): string[];
|
|
64
|
-
/** A page's title as a path segment: "Our
|
|
66
|
+
/** A page's title as a path segment: "Our services" → "/our-services". */
|
|
65
67
|
declare function slugify(title: string): string;
|
|
66
68
|
/**
|
|
67
69
|
* Move a page to a new address. The store writes a 301 from the old path
|
package/dist/editor.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { starterSite, exampleBrands, landingPage } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { starterSite, exampleBrands, landingPage } from './chunk-XOM334IK.js';
|
|
2
|
+
import './chunk-3XCKSU4Z.js';
|
|
3
3
|
import './chunk-VZUDRPFG.js';
|
|
4
|
-
import { stableHash, isConflict, prepareRelease, PublishBlockedError, siteTheme, brandDisplayName, themeCss, migrateNode, migratePage, migrateSite } from './chunk-
|
|
5
|
-
import { getSection, sectionJsonSchema, listSections, SECTION_CATEGORIES, PageDoc, SiteDoc, newSectionId } from './chunk-
|
|
6
|
-
import { isSafeImageSrc, DEFAULT_RESERVED_PATHS, pagePathProblems, isSafeHref } from './chunk-
|
|
4
|
+
import { stableHash, isConflict, prepareRelease, PublishBlockedError, siteTheme, brandDisplayName, themeCss, migrateNode, migratePage, migrateSite } from './chunk-VLY75P7W.js';
|
|
5
|
+
import { getSection, sectionJsonSchema, listSections, SECTION_CATEGORIES, PageDoc, SiteDoc, newSectionId } from './chunk-YAASBQTJ.js';
|
|
6
|
+
import { isSafeImageSrc, DEFAULT_RESERVED_PATHS, pagePathProblems, isSafeHref } from './chunk-MU2Z2C4F.js';
|
|
7
7
|
import * as React7 from 'react';
|
|
8
8
|
import { createContext, useContext } from 'react';
|
|
9
9
|
import { createUsePuck, Puck } from '@puckeditor/core';
|
|
@@ -522,7 +522,7 @@ function ImageField({ field, id, value, onChange, readOnly }) {
|
|
|
522
522
|
const choose = async () => {
|
|
523
523
|
const picked = await services.pickImage(image.src ? { current: image } : {});
|
|
524
524
|
if (!picked) return;
|
|
525
|
-
const { src: _s, alt: _a, decorative: _d, width: _w, height: _h, focal: _f, ...rest } = image;
|
|
525
|
+
const { src: _s, alt: _a, decorative: _d, width: _w, height: _h, focal: _f, phone: _p, placeholder: _b, ...rest } = image;
|
|
526
526
|
onChange({ ...rest, ...picked });
|
|
527
527
|
};
|
|
528
528
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", role: "group", "aria-labelledby": `${id}-label`, children: [
|
|
@@ -766,7 +766,7 @@ function imageItemFields(schema, ctx) {
|
|
|
766
766
|
};
|
|
767
767
|
const required = new Set(schema.required ?? []);
|
|
768
768
|
for (const [key, prop] of Object.entries(schema.properties ?? {})) {
|
|
769
|
-
if (["src", "alt", "decorative", "width", "height", "focal"].includes(key)) continue;
|
|
769
|
+
if (["src", "alt", "decorative", "width", "height", "focal", "phone", "placeholder"].includes(key)) continue;
|
|
770
770
|
out[key] = fieldFor(key, prop, required.has(key), ctx);
|
|
771
771
|
}
|
|
772
772
|
return out;
|
|
@@ -1135,7 +1135,11 @@ async function checkSite(store, siteId, options2 = {}) {
|
|
|
1135
1135
|
});
|
|
1136
1136
|
let issues;
|
|
1137
1137
|
try {
|
|
1138
|
-
issues = prepareRelease(draft.site, pages, {
|
|
1138
|
+
issues = prepareRelease(draft.site, pages, {
|
|
1139
|
+
reserved: options2.reserved ?? DEFAULT_RESERVED_PATHS,
|
|
1140
|
+
...options2.brand ? { brand: options2.brand } : {},
|
|
1141
|
+
...store.assetOrigin ? { assetOrigins: [store.assetOrigin] } : {}
|
|
1142
|
+
}).issues;
|
|
1139
1143
|
} catch (err) {
|
|
1140
1144
|
if (!(err instanceof PublishBlockedError)) {
|
|
1141
1145
|
issues = [{ severity: "error", code: "invalid-draft", message: `The drafts can't be checked: ${err.message}` }];
|
|
@@ -1513,12 +1517,12 @@ function PagesPanel(props) {
|
|
|
1513
1517
|
|
|
1514
1518
|
// src/editor/preview.ts
|
|
1515
1519
|
async function loadSiteCss() {
|
|
1516
|
-
const { ASSETS } = await import('./assets.generated-
|
|
1520
|
+
const { ASSETS } = await import('./assets.generated-P7NPIZHO.js');
|
|
1517
1521
|
return ASSETS.css.body;
|
|
1518
1522
|
}
|
|
1519
1523
|
var styleText = (css) => css.replace(/<\/style/gi, "<\\/style");
|
|
1520
1524
|
async function renderPreview(input) {
|
|
1521
|
-
const [{ renderSitePageToString }, { ASSETS }] = await Promise.all([import('./handler-
|
|
1525
|
+
const [{ renderSitePageToString }, { ASSETS }] = await Promise.all([import('./handler-ESFMOYYF.js'), import('./assets.generated-P7NPIZHO.js')]);
|
|
1522
1526
|
const result = await renderSitePageToString(new Request(`https://preview.invalid${input.path}`), {
|
|
1523
1527
|
store: input.store,
|
|
1524
1528
|
brand: { getBrand: () => input.brand },
|