bsmnt 0.9.0 → 0.11.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/dist/application/add-integration/index.d.ts.map +1 -1
- package/dist/application/add-integration/index.js +19 -2
- package/dist/application/add-integration/index.js.map +1 -1
- package/dist/application/shared/node-version.js.map +1 -1
- package/dist/core/create/internal-ids.d.ts +3 -0
- package/dist/core/create/internal-ids.d.ts.map +1 -1
- package/dist/core/create/internal-ids.js +4 -0
- package/dist/core/create/internal-ids.js.map +1 -1
- package/dist/domain/agents.d.ts.map +1 -1
- package/dist/domain/animations.d.ts.map +1 -1
- package/dist/domain/cms.d.ts.map +1 -1
- package/dist/domain/forms.d.ts.map +1 -1
- package/dist/domain/hooks.d.ts.map +1 -1
- package/dist/domain/skills.d.ts.map +1 -1
- package/dist/domain/templates.d.ts +10 -0
- package/dist/domain/templates.d.ts.map +1 -1
- package/dist/domain/templates.js +5 -0
- package/dist/domain/templates.js.map +1 -1
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/agents/register-sanity-mcp.js +3 -8
- package/dist/infrastructure/agents/register-sanity-mcp.js.map +1 -1
- package/dist/infrastructure/agents/register-storybook-mcp.d.ts +18 -0
- package/dist/infrastructure/agents/register-storybook-mcp.d.ts.map +1 -0
- package/dist/infrastructure/agents/register-storybook-mcp.js +157 -0
- package/dist/infrastructure/agents/register-storybook-mcp.js.map +1 -0
- package/dist/infrastructure/create/lifecycle-registry.d.ts.map +1 -1
- package/dist/infrastructure/create/lifecycle-registry.js +39 -1
- package/dist/infrastructure/create/lifecycle-registry.js.map +1 -1
- package/dist/infrastructure/create/merge-registry.d.ts.map +1 -1
- package/dist/infrastructure/create/merge-registry.js +4 -0
- package/dist/infrastructure/create/merge-registry.js.map +1 -1
- package/dist/infrastructure/create/sanity-auth.js.map +1 -1
- package/dist/infrastructure/create/setup-agent.d.ts +6 -1
- package/dist/infrastructure/create/setup-agent.d.ts.map +1 -1
- package/dist/infrastructure/create/setup-agent.js +23 -21
- package/dist/infrastructure/create/setup-agent.js.map +1 -1
- package/dist/infrastructure/create/setup-dotenvx.js.map +1 -1
- package/dist/infrastructure/create/setup-remote.js.map +1 -1
- package/dist/infrastructure/create/setup-sanity.d.ts.map +1 -1
- package/dist/infrastructure/create/setup-sanity.js +12 -1
- package/dist/infrastructure/create/setup-sanity.js.map +1 -1
- package/dist/infrastructure/integrations/ensure-studio-headers.d.ts +6 -0
- package/dist/infrastructure/integrations/ensure-studio-headers.d.ts.map +1 -0
- package/dist/infrastructure/integrations/ensure-studio-headers.js +153 -0
- package/dist/infrastructure/integrations/ensure-studio-headers.js.map +1 -0
- package/dist/infrastructure/integrations/inject-integration.d.ts.map +1 -1
- package/dist/infrastructure/integrations/inject-integration.js +2 -0
- package/dist/infrastructure/integrations/inject-integration.js.map +1 -1
- package/dist/infrastructure/update/notifier.js.map +1 -1
- package/dist/modules/features/cms/index.d.ts.map +1 -1
- package/dist/modules/features/cms/index.js +2 -0
- package/dist/modules/features/cms/index.js.map +1 -1
- package/dist/modules/features/cms/sanity/config.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity/config.js +3 -1
- package/dist/modules/features/cms/sanity/config.js.map +1 -1
- package/dist/modules/features/cms/sanity/index.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity/index.js +10 -1
- package/dist/modules/features/cms/sanity/index.js.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/check-integration.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/check-integration.js +15 -6
- package/dist/modules/features/cms/sanity/mergers/check-integration.js.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/knip.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/knip.js +1 -0
- package/dist/modules/features/cms/sanity/mergers/knip.js.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/layout.js.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/package-json.d.ts +12 -0
- package/dist/modules/features/cms/sanity/mergers/package-json.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity/mergers/package-json.js +19 -0
- package/dist/modules/features/cms/sanity/mergers/package-json.js.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder/config.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity-pagebuilder/config.js +2 -1
- package/dist/modules/features/cms/sanity-pagebuilder/config.js.map +1 -1
- package/dist/modules/features/cms/sanity-pagebuilder/index.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity-pagebuilder/index.js +7 -1
- package/dist/modules/features/cms/sanity-pagebuilder/index.js.map +1 -1
- package/dist/modules/features/cms/sanity-pagebuilder-cache/config.d.ts +14 -0
- package/dist/modules/features/cms/sanity-pagebuilder-cache/config.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder-cache/config.js +50 -0
- package/dist/modules/features/cms/sanity-pagebuilder-cache/config.js.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder-cache/index.d.ts +3 -0
- package/dist/modules/features/cms/sanity-pagebuilder-cache/index.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder-cache/index.js +55 -0
- package/dist/modules/features/cms/sanity-pagebuilder-cache/index.js.map +1 -0
- package/dist/modules/presets/index.d.ts.map +1 -1
- package/dist/modules/presets/index.js +2 -0
- package/dist/modules/presets/index.js.map +1 -1
- package/dist/modules/presets/next-pagebuilder-cache.d.ts +3 -0
- package/dist/modules/presets/next-pagebuilder-cache.d.ts.map +1 -0
- package/dist/modules/presets/next-pagebuilder-cache.js +10 -0
- package/dist/modules/presets/next-pagebuilder-cache.js.map +1 -0
- package/dist/paths.d.ts +6 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +6 -0
- package/dist/paths.js.map +1 -1
- package/package.json +6 -3
- package/src/modules/features/cms/sanity/files/app/api/blog/[slug]/route.ts +4 -1
- package/src/modules/features/cms/sanity/files/app/sitemap.md/route.ts +2 -1
- package/src/modules/features/cms/sanity/files/components/ui/sanity-image/index.tsx +19 -5
- package/src/modules/features/cms/sanity/files/lib/integrations/check-integration.ts +7 -6
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/README.md +32 -1
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/components/rich-text.tsx +1 -0
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/env.ts +2 -2
- package/src/modules/features/cms/sanity/files/proxy.ts +9 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/app/api/[[...slug]]/route.ts +12 -3
- package/src/modules/features/cms/sanity-pagebuilder/files/app/api/revalidate/route.ts +172 -24
- package/src/modules/features/cms/sanity-pagebuilder/files/app/feed.xml/route.ts +14 -7
- package/src/modules/features/cms/sanity-pagebuilder/files/app/sitemap.md/route.ts +8 -2
- package/src/modules/features/cms/sanity-pagebuilder/files/app/studio/[[...tool]]/page.tsx +16 -1
- package/src/modules/features/cms/sanity-pagebuilder/files/components/sanity/rich-text.tsx +1 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/components/sanity/visual-editing.tsx +2 -2
- package/src/modules/features/cms/sanity-pagebuilder/files/components/ui/sanity-image/index.tsx +15 -5
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/check-integration.ts +6 -5
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/client.ts +8 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/slug-field.tsx +13 -7
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/slug-notices.tsx +125 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/env.ts +2 -2
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/fetchers/layout.ts +22 -52
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/icons.ts +2 -2
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/live/index.tsx +4 -2
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/markdown-proxy.config.ts +1 -1
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/page-builder-config.ts +7 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/page-tree-pane.tsx +70 -57
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/queries.ts +119 -29
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/revalidate-paths.ts +70 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/components/index.ts +1 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/components/reusable/rich-text-block.ts +39 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/index.ts +2 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/layout/redirect.ts +35 -4
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/page.ts +12 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/tags.ts +56 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/utils/page-builder-markdown.ts +12 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/utils/sitemap.ts +11 -8
- package/src/modules/features/cms/sanity-pagebuilder/files/proxy.ts +9 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/.knip.json +8 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/api/[[...slug]]/route.ts +112 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/api/draft-mode/disable/route.ts +7 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/api/draft-mode/enable/route.ts +20 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/api/revalidate/route.ts +292 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/feed.xml/route.ts +66 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/sitemap.md/route.ts +132 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/studio/[[...tool]]/layout.tsx +26 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/studio/[[...tool]]/page.tsx +23 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/components/sanity/draft-mode-toggle.tsx +27 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/components/sanity/rich-text.tsx +88 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/components/sanity/visual-editing.tsx +11 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/components/ui/sanity-image/index.tsx +51 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/check-integration.ts +6 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/client.ts +37 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/block-actions-item.tsx +81 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/disable-draft-mode.tsx +23 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/page-builder-input.tsx +39 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/page-category-input.tsx +50 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/same-as-input.tsx +66 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/slug-field.tsx +24 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/slug-input.tsx +14 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/slug-notices.tsx +125 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/confirm-publish-action.ts +40 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/env.ts +34 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/fetchers/layout.ts +39 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/fetchers/redirects.ts +22 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/icons.ts +81 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/live/index.tsx +140 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/markdown-proxy.config.ts +50 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/page-builder-config.ts +144 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/page-category.ts +28 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/page-tree-pane.tsx +431 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/pinned-pages.ts +54 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/presentation.ts +119 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/queries.ts +548 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/revalidate-paths.ts +70 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/sanity.cli.ts +29 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/sanity.config.ts +116 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/index.ts +6 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/blog-content.ts +89 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/description.ts +29 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/gated-content.ts +178 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/hero.ts +28 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/rich-text-block.ts +39 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/singleton/content-collection.ts +45 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/content/author.ts +70 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/content/blog-category.ts +55 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/index.ts +134 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/company-data.ts +70 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/footer.ts +79 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/navbar.ts +75 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/redirect.ts +152 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/structured-data.ts +124 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/link.ts +125 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/logo-field.ts +9 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/metadata.ts +132 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/nav-objects.ts +192 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/page-builder.ts +43 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/page-folder.ts +124 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/page.ts +265 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/richText.ts +63 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/structured-data-blocks.ts +436 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/singletons.ts +51 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/structure.ts +334 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/tags.ts +89 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/utils/image.ts +8 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/utils/link.ts +140 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/utils/page-builder-markdown.ts +113 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/utils/page-json-ld.ts +208 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/scripts/sanity-typegen.ts +36 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/check-redirect.ts +30 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/json-ld.tsx +522 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/metadata.ts +189 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/rss.ts +96 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/sitemap.ts +58 -0
- package/src/modules/features/cms/sanity-pagebuilder-cache/files/proxy.ts +90 -0
- package/src/modules/features/env/dotenvx/files/vercelignore +5 -0
- package/src/templates/next-default/.env.example +4 -2
- package/src/templates/next-default/.github/workflows/ci.yml +1 -1
- package/src/templates/next-default/.vscode/settings.json +0 -2
- package/src/templates/next-default/app/robots.ts +2 -3
- package/src/templates/next-default/components/ui/image/index.tsx +2 -4
- package/src/templates/next-default/knip.json +1 -1
- package/src/templates/next-default/lefthook.yml +1 -1
- package/src/templates/next-default/lib/utils/README.md +18 -5
- package/src/templates/next-default/lib/utils/image-sizes.ts +72 -0
- package/src/templates/next-default/lib/utils/merge-refs.ts +56 -0
- package/src/templates/next-default/lib/utils/strings.ts +1 -51
- package/src/templates/next-default/next.config.ts +38 -5
- package/src/templates/next-default/package.json +9 -12
- package/src/templates/next-experiments/.env.example +4 -2
- package/src/templates/next-experiments/.github/workflows/ci.yml +1 -1
- package/src/templates/next-experiments/.vscode/settings.json +0 -2
- package/src/templates/next-experiments/app/page.tsx +1 -1
- package/src/templates/next-experiments/app/robots.ts +2 -3
- package/src/templates/next-experiments/components/ui/image/index.tsx +2 -4
- package/src/templates/next-experiments/knip.json +1 -1
- package/src/templates/next-experiments/lefthook.yml +1 -1
- package/src/templates/next-experiments/lib/utils/README.md +18 -5
- package/src/templates/next-experiments/lib/utils/image-sizes.ts +72 -0
- package/src/templates/next-experiments/lib/utils/merge-refs.ts +56 -0
- package/src/templates/next-experiments/lib/utils/strings.ts +1 -51
- package/src/templates/next-experiments/next.config.ts +38 -5
- package/src/templates/next-experiments/package.json +9 -12
- package/src/templates/next-pagebuilder/.env.example +3 -0
- package/src/templates/next-pagebuilder/.github/workflows/ci.yml +1 -1
- package/src/templates/next-pagebuilder/.vscode/settings.json +0 -2
- package/src/templates/next-pagebuilder/README.md +95 -0
- package/src/templates/next-pagebuilder/app/(content)/[[...slug]]/page.tsx +24 -9
- package/src/templates/next-pagebuilder/app/robots.ts +2 -3
- package/src/templates/next-pagebuilder/app/sitemap.xml/route.ts +9 -4
- package/src/templates/next-pagebuilder/biome.json +2 -1
- package/src/templates/next-pagebuilder/components/layout/footer/index.tsx +3 -6
- package/src/templates/next-pagebuilder/components/layout/header/index.tsx +3 -2
- package/src/templates/next-pagebuilder/components/layout/json-ld/index.tsx +3 -8
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/content-filters.tsx +23 -40
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/index.tsx +88 -58
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/skeleton.tsx +41 -0
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/types.ts +14 -1
- package/src/templates/next-pagebuilder/components/page-builder/components/rich-text-block.tsx +16 -0
- package/src/templates/next-pagebuilder/components/page-builder/renderer.tsx +23 -3
- package/src/templates/next-pagebuilder/components/page-document/index.tsx +1 -0
- package/src/templates/next-pagebuilder/components/ui/image/index.tsx +2 -1
- package/src/templates/next-pagebuilder/knip.json +3 -2
- package/src/templates/next-pagebuilder/lefthook.yml +1 -1
- package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.types.ts +1221 -977
- package/src/templates/next-pagebuilder/lib/utils/image-sizes.ts +72 -0
- package/src/templates/next-pagebuilder/lib/utils/merge-refs.ts +56 -0
- package/src/templates/next-pagebuilder/next.config.ts +35 -5
- package/src/templates/next-pagebuilder/package.json +8 -10
- package/src/templates/next-pagebuilder-cache/.biome/plugins/README.md +21 -0
- package/src/templates/next-pagebuilder-cache/.biome/plugins/no-anchor-element.grit +12 -0
- package/src/templates/next-pagebuilder-cache/.biome/plugins/no-relative-parent-imports.grit +10 -0
- package/src/templates/next-pagebuilder-cache/.biome/plugins/no-unnecessary-forwardref.grit +9 -0
- package/src/templates/next-pagebuilder-cache/.env.example +40 -0
- package/src/templates/next-pagebuilder-cache/.github/PULL_REQUEST_TEMPLATE.md +13 -0
- package/src/templates/next-pagebuilder-cache/.github/workflows/ci.yml +105 -0
- package/src/templates/next-pagebuilder-cache/.vscode/extensions.json +19 -0
- package/src/templates/next-pagebuilder-cache/.vscode/settings.json +103 -0
- package/src/templates/next-pagebuilder-cache/.zed/settings.json +47 -0
- package/src/templates/next-pagebuilder-cache/README.md +212 -0
- package/src/templates/next-pagebuilder-cache/_gitignore +65 -0
- package/src/templates/next-pagebuilder-cache/app/(content)/[[...slug]]/page.tsx +124 -0
- package/src/templates/next-pagebuilder-cache/app/(content)/layout.tsx +28 -0
- package/src/templates/next-pagebuilder-cache/app/actions/unlock-gated-content.ts +53 -0
- package/src/templates/next-pagebuilder-cache/app/favicon.ico +0 -0
- package/src/templates/next-pagebuilder-cache/app/layout.tsx +83 -0
- package/src/templates/next-pagebuilder-cache/app/robots.ts +13 -0
- package/src/templates/next-pagebuilder-cache/app/sitemap.xml/route.ts +84 -0
- package/src/templates/next-pagebuilder-cache/biome.json +257 -0
- package/src/templates/next-pagebuilder-cache/components/layout/footer/index.tsx +127 -0
- package/src/templates/next-pagebuilder-cache/components/layout/header/components/cta-button.tsx +28 -0
- package/src/templates/next-pagebuilder-cache/components/layout/header/components/mega-menu-panel.tsx +90 -0
- package/src/templates/next-pagebuilder-cache/components/layout/header/components/nav-item-renderer.tsx +98 -0
- package/src/templates/next-pagebuilder-cache/components/layout/header/components/nav-leaf-item.tsx +33 -0
- package/src/templates/next-pagebuilder-cache/components/layout/header/components/types.ts +7 -0
- package/src/templates/next-pagebuilder-cache/components/layout/header/header-client.tsx +110 -0
- package/src/templates/next-pagebuilder-cache/components/layout/header/index.tsx +32 -0
- package/src/templates/next-pagebuilder-cache/components/layout/json-ld/index.tsx +79 -0
- package/src/templates/next-pagebuilder-cache/components/layout/wrapper/index.tsx +33 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/article-content/index.tsx +78 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/article-content/related-post-item.tsx +27 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/content-card.tsx +66 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/content-filters.tsx +76 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/content-grid.tsx +40 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/content-pagination-nav.tsx +71 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/index.tsx +306 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/skeleton.tsx +41 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/types.ts +32 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/description.tsx +17 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/gated-content/index.tsx +169 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/hero.tsx +17 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/components/rich-text-block.tsx +16 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/renderer.tsx +71 -0
- package/src/templates/next-pagebuilder-cache/components/page-builder/types.ts +25 -0
- package/src/templates/next-pagebuilder-cache/components/page-document/index.tsx +147 -0
- package/src/templates/next-pagebuilder-cache/components/ui/image/index.tsx +216 -0
- package/src/templates/next-pagebuilder-cache/components/ui/link/index.tsx +152 -0
- package/src/templates/next-pagebuilder-cache/components.json +24 -0
- package/src/templates/next-pagebuilder-cache/knip.json +35 -0
- package/src/templates/next-pagebuilder-cache/lefthook.yml +25 -0
- package/src/templates/next-pagebuilder-cache/lib/integrations/sanity/sanity.types.ts +1588 -0
- package/src/templates/next-pagebuilder-cache/lib/scripts/setup-ci-secrets.ts +117 -0
- package/src/templates/next-pagebuilder-cache/lib/styles/cn.ts +5 -0
- package/src/templates/next-pagebuilder-cache/lib/styles/global.css +69 -0
- package/src/templates/next-pagebuilder-cache/lib/utils/base-url.ts +17 -0
- package/src/templates/next-pagebuilder-cache/lib/utils/format-date.ts +8 -0
- package/src/templates/next-pagebuilder-cache/lib/utils/slug-tag.ts +6 -0
- package/src/templates/next-pagebuilder-cache/next.config.ts +176 -0
- package/src/templates/next-pagebuilder-cache/package.json +62 -0
- package/src/templates/next-pagebuilder-cache/postcss.config.mjs +65 -0
- package/src/templates/next-pagebuilder-cache/svg.d.ts +6 -0
- package/src/templates/next-pagebuilder-cache/tsconfig.json +38 -0
- package/src/templates/next-webgl/.env.example +4 -2
- package/src/templates/next-webgl/.github/workflows/ci.yml +1 -1
- package/src/templates/next-webgl/.vscode/settings.json +0 -2
- package/src/templates/next-webgl/app/robots.ts +2 -3
- package/src/templates/next-webgl/components/ui/image/index.tsx +2 -4
- package/src/templates/next-webgl/knip.json +1 -1
- package/src/templates/next-webgl/lefthook.yml +1 -1
- package/src/templates/next-webgl/lib/utils/README.md +18 -5
- package/src/templates/next-webgl/lib/utils/image-sizes.ts +72 -0
- package/src/templates/next-webgl/lib/utils/merge-refs.ts +56 -0
- package/src/templates/next-webgl/lib/utils/strings.ts +1 -51
- package/src/templates/next-webgl/next.config.ts +38 -5
- package/src/templates/next-webgl/package.json +11 -14
- package/src/templates/next-experiments/tsconfig.tsbuildinfo +0 -1
- package/src/templates/next-pagebuilder/app/actions/refresh.ts +0 -5
- package/src/templates/next-webgl/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import { defineArrayMember, defineField, defineType } from "sanity";
|
|
2
|
+
import {
|
|
3
|
+
customJsonLdIcon,
|
|
4
|
+
eventJsonLdIcon,
|
|
5
|
+
faqJsonLdIcon,
|
|
6
|
+
itemListJsonLdIcon,
|
|
7
|
+
jobPostingJsonLdIcon,
|
|
8
|
+
softwareApplicationJsonLdIcon,
|
|
9
|
+
videoJsonLdIcon,
|
|
10
|
+
} from "@/lib/integrations/sanity/icons";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Editor-selectable JSON-LD blocks (predefined schema.org types + a raw
|
|
14
|
+
* `customJsonLd` escape hatch), each emitted as its own script tag.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export const faqJsonLd = defineType({
|
|
18
|
+
name: "faqJsonLd",
|
|
19
|
+
title: "FAQ",
|
|
20
|
+
type: "object",
|
|
21
|
+
icon: faqJsonLdIcon,
|
|
22
|
+
fields: [
|
|
23
|
+
defineField({
|
|
24
|
+
name: "questions",
|
|
25
|
+
title: "Questions",
|
|
26
|
+
type: "array",
|
|
27
|
+
validation: (Rule) => Rule.min(1),
|
|
28
|
+
of: [
|
|
29
|
+
defineArrayMember({
|
|
30
|
+
type: "object",
|
|
31
|
+
fields: [
|
|
32
|
+
defineField({
|
|
33
|
+
name: "question",
|
|
34
|
+
title: "Question",
|
|
35
|
+
type: "string",
|
|
36
|
+
validation: (Rule) => Rule.required(),
|
|
37
|
+
}),
|
|
38
|
+
defineField({
|
|
39
|
+
name: "answer",
|
|
40
|
+
title: "Answer",
|
|
41
|
+
type: "text",
|
|
42
|
+
rows: 3,
|
|
43
|
+
validation: (Rule) => Rule.required(),
|
|
44
|
+
}),
|
|
45
|
+
],
|
|
46
|
+
preview: {
|
|
47
|
+
select: { title: "question", subtitle: "answer" },
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
],
|
|
51
|
+
}),
|
|
52
|
+
],
|
|
53
|
+
preview: {
|
|
54
|
+
select: { questions: "questions" },
|
|
55
|
+
prepare: ({ questions }) => ({
|
|
56
|
+
title: "FAQ",
|
|
57
|
+
subtitle: `${Array.isArray(questions) ? questions.length : 0} question(s)`,
|
|
58
|
+
}),
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export const jobPostingJsonLd = defineType({
|
|
63
|
+
name: "jobPostingJsonLd",
|
|
64
|
+
title: "Job Posting",
|
|
65
|
+
type: "object",
|
|
66
|
+
icon: jobPostingJsonLdIcon,
|
|
67
|
+
fields: [
|
|
68
|
+
defineField({
|
|
69
|
+
name: "title",
|
|
70
|
+
title: "Job Title",
|
|
71
|
+
type: "string",
|
|
72
|
+
validation: (Rule) => Rule.required(),
|
|
73
|
+
}),
|
|
74
|
+
defineField({
|
|
75
|
+
name: "description",
|
|
76
|
+
title: "Description",
|
|
77
|
+
type: "text",
|
|
78
|
+
rows: 4,
|
|
79
|
+
validation: (Rule) => Rule.required(),
|
|
80
|
+
}),
|
|
81
|
+
defineField({
|
|
82
|
+
name: "datePosted",
|
|
83
|
+
title: "Date Posted",
|
|
84
|
+
type: "datetime",
|
|
85
|
+
validation: (Rule) => Rule.required(),
|
|
86
|
+
}),
|
|
87
|
+
defineField({
|
|
88
|
+
name: "validThrough",
|
|
89
|
+
title: "Valid Through",
|
|
90
|
+
type: "datetime",
|
|
91
|
+
description: "When the posting expires.",
|
|
92
|
+
}),
|
|
93
|
+
defineField({
|
|
94
|
+
name: "employmentType",
|
|
95
|
+
title: "Employment Type",
|
|
96
|
+
type: "string",
|
|
97
|
+
options: {
|
|
98
|
+
list: [
|
|
99
|
+
{ title: "Full-time", value: "FULL_TIME" },
|
|
100
|
+
{ title: "Part-time", value: "PART_TIME" },
|
|
101
|
+
{ title: "Contractor", value: "CONTRACTOR" },
|
|
102
|
+
{ title: "Temporary", value: "TEMPORARY" },
|
|
103
|
+
{ title: "Intern", value: "INTERN" },
|
|
104
|
+
{ title: "Volunteer", value: "VOLUNTEER" },
|
|
105
|
+
{ title: "Per diem", value: "PER_DIEM" },
|
|
106
|
+
{ title: "Other", value: "OTHER" },
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
}),
|
|
110
|
+
defineField({
|
|
111
|
+
name: "organizationName",
|
|
112
|
+
title: "Hiring Organization",
|
|
113
|
+
type: "string",
|
|
114
|
+
}),
|
|
115
|
+
defineField({
|
|
116
|
+
name: "organizationUrl",
|
|
117
|
+
title: "Organization URL",
|
|
118
|
+
type: "url",
|
|
119
|
+
}),
|
|
120
|
+
defineField({
|
|
121
|
+
name: "remote",
|
|
122
|
+
title: "Remote / Telecommute",
|
|
123
|
+
type: "boolean",
|
|
124
|
+
initialValue: false,
|
|
125
|
+
}),
|
|
126
|
+
defineField({ name: "locality", title: "City", type: "string" }),
|
|
127
|
+
defineField({ name: "region", title: "Region / State", type: "string" }),
|
|
128
|
+
defineField({ name: "country", title: "Country", type: "string" }),
|
|
129
|
+
],
|
|
130
|
+
preview: {
|
|
131
|
+
select: { title: "title", subtitle: "organizationName" },
|
|
132
|
+
prepare: ({ title, subtitle }) => ({
|
|
133
|
+
title: title || "Job Posting",
|
|
134
|
+
subtitle: subtitle ? `Job · ${subtitle}` : "Job Posting",
|
|
135
|
+
}),
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export const softwareApplicationJsonLd = defineType({
|
|
140
|
+
name: "softwareApplicationJsonLd",
|
|
141
|
+
title: "Software Application",
|
|
142
|
+
type: "object",
|
|
143
|
+
icon: softwareApplicationJsonLdIcon,
|
|
144
|
+
fields: [
|
|
145
|
+
defineField({
|
|
146
|
+
name: "name",
|
|
147
|
+
title: "Name",
|
|
148
|
+
type: "string",
|
|
149
|
+
validation: (Rule) => Rule.required(),
|
|
150
|
+
}),
|
|
151
|
+
defineField({
|
|
152
|
+
name: "description",
|
|
153
|
+
title: "Description",
|
|
154
|
+
type: "text",
|
|
155
|
+
rows: 2,
|
|
156
|
+
}),
|
|
157
|
+
defineField({
|
|
158
|
+
name: "applicationCategory",
|
|
159
|
+
title: "Application Category",
|
|
160
|
+
type: "string",
|
|
161
|
+
options: {
|
|
162
|
+
list: [
|
|
163
|
+
{ title: "Web application", value: "WebApplication" },
|
|
164
|
+
{ title: "Mobile application", value: "MobileApplication" },
|
|
165
|
+
{ title: "Developer tool", value: "DeveloperApplication" },
|
|
166
|
+
{ title: "Business application", value: "BusinessApplication" },
|
|
167
|
+
{ title: "Design application", value: "DesignApplication" },
|
|
168
|
+
{ title: "Game", value: "GameApplication" },
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
}),
|
|
172
|
+
defineField({
|
|
173
|
+
name: "operatingSystem",
|
|
174
|
+
title: "Operating System",
|
|
175
|
+
type: "string",
|
|
176
|
+
description: "e.g. 'Web', 'macOS, Windows', 'iOS, Android'.",
|
|
177
|
+
}),
|
|
178
|
+
defineField({
|
|
179
|
+
name: "price",
|
|
180
|
+
title: "Price",
|
|
181
|
+
type: "number",
|
|
182
|
+
description: "Use 0 for free apps. Enables the rich result.",
|
|
183
|
+
}),
|
|
184
|
+
defineField({
|
|
185
|
+
name: "currency",
|
|
186
|
+
title: "Currency",
|
|
187
|
+
type: "string",
|
|
188
|
+
description: "ISO 4217 code, e.g. USD, EUR.",
|
|
189
|
+
initialValue: "USD",
|
|
190
|
+
}),
|
|
191
|
+
defineField({ name: "url", title: "URL", type: "url" }),
|
|
192
|
+
defineField({ name: "image", title: "Screenshot / Icon", type: "image" }),
|
|
193
|
+
],
|
|
194
|
+
preview: {
|
|
195
|
+
select: { title: "name", subtitle: "applicationCategory" },
|
|
196
|
+
prepare: ({ title, subtitle }) => ({
|
|
197
|
+
title: title || "Software Application",
|
|
198
|
+
subtitle: subtitle ? `App · ${subtitle}` : "Software Application",
|
|
199
|
+
}),
|
|
200
|
+
},
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
export const itemListJsonLd = defineType({
|
|
204
|
+
name: "itemListJsonLd",
|
|
205
|
+
title: "Item List / Carousel",
|
|
206
|
+
type: "object",
|
|
207
|
+
icon: itemListJsonLdIcon,
|
|
208
|
+
description:
|
|
209
|
+
"An ordered list of links (e.g. a carousel of articles or products). Each item points to a page on your site.",
|
|
210
|
+
fields: [
|
|
211
|
+
defineField({
|
|
212
|
+
name: "name",
|
|
213
|
+
title: "List Name",
|
|
214
|
+
type: "string",
|
|
215
|
+
description: "Optional title for the list.",
|
|
216
|
+
}),
|
|
217
|
+
defineField({
|
|
218
|
+
name: "items",
|
|
219
|
+
title: "Items",
|
|
220
|
+
type: "array",
|
|
221
|
+
validation: (Rule) => Rule.min(1),
|
|
222
|
+
of: [
|
|
223
|
+
defineArrayMember({
|
|
224
|
+
type: "object",
|
|
225
|
+
fields: [
|
|
226
|
+
defineField({
|
|
227
|
+
name: "name",
|
|
228
|
+
title: "Name",
|
|
229
|
+
type: "string",
|
|
230
|
+
validation: (Rule) => Rule.required(),
|
|
231
|
+
}),
|
|
232
|
+
defineField({
|
|
233
|
+
name: "url",
|
|
234
|
+
title: "URL",
|
|
235
|
+
type: "url",
|
|
236
|
+
validation: (Rule) => Rule.required(),
|
|
237
|
+
}),
|
|
238
|
+
],
|
|
239
|
+
preview: {
|
|
240
|
+
select: { title: "name", subtitle: "url" },
|
|
241
|
+
},
|
|
242
|
+
}),
|
|
243
|
+
],
|
|
244
|
+
}),
|
|
245
|
+
],
|
|
246
|
+
preview: {
|
|
247
|
+
select: { title: "name", items: "items" },
|
|
248
|
+
prepare: ({ title, items }) => ({
|
|
249
|
+
title: title || "Item List / Carousel",
|
|
250
|
+
subtitle: `${Array.isArray(items) ? items.length : 0} item(s)`,
|
|
251
|
+
}),
|
|
252
|
+
},
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
export const eventJsonLd = defineType({
|
|
256
|
+
name: "eventJsonLd",
|
|
257
|
+
title: "Event",
|
|
258
|
+
type: "object",
|
|
259
|
+
icon: eventJsonLdIcon,
|
|
260
|
+
fields: [
|
|
261
|
+
defineField({
|
|
262
|
+
name: "name",
|
|
263
|
+
title: "Name",
|
|
264
|
+
type: "string",
|
|
265
|
+
validation: (Rule) => Rule.required(),
|
|
266
|
+
}),
|
|
267
|
+
defineField({
|
|
268
|
+
name: "description",
|
|
269
|
+
title: "Description",
|
|
270
|
+
type: "text",
|
|
271
|
+
rows: 2,
|
|
272
|
+
}),
|
|
273
|
+
defineField({
|
|
274
|
+
name: "startDate",
|
|
275
|
+
title: "Start Date",
|
|
276
|
+
type: "datetime",
|
|
277
|
+
validation: (Rule) => Rule.required(),
|
|
278
|
+
}),
|
|
279
|
+
defineField({ name: "endDate", title: "End Date", type: "datetime" }),
|
|
280
|
+
defineField({
|
|
281
|
+
name: "locationName",
|
|
282
|
+
title: "Location Name",
|
|
283
|
+
type: "string",
|
|
284
|
+
description: "Venue name, or leave blank for online events.",
|
|
285
|
+
}),
|
|
286
|
+
defineField({
|
|
287
|
+
name: "locationAddress",
|
|
288
|
+
title: "Location Address",
|
|
289
|
+
type: "string",
|
|
290
|
+
}),
|
|
291
|
+
defineField({
|
|
292
|
+
name: "url",
|
|
293
|
+
title: "Event URL",
|
|
294
|
+
type: "url",
|
|
295
|
+
}),
|
|
296
|
+
defineField({ name: "image", title: "Image", type: "image" }),
|
|
297
|
+
],
|
|
298
|
+
preview: {
|
|
299
|
+
select: { title: "name", subtitle: "startDate" },
|
|
300
|
+
prepare: ({ title, subtitle }) => ({
|
|
301
|
+
title: title || "Event",
|
|
302
|
+
subtitle: subtitle ? `Event · ${subtitle}` : "Event",
|
|
303
|
+
}),
|
|
304
|
+
},
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
export const videoJsonLd = defineType({
|
|
308
|
+
name: "videoJsonLd",
|
|
309
|
+
title: "Video",
|
|
310
|
+
type: "object",
|
|
311
|
+
icon: videoJsonLdIcon,
|
|
312
|
+
fields: [
|
|
313
|
+
defineField({
|
|
314
|
+
name: "name",
|
|
315
|
+
title: "Name",
|
|
316
|
+
type: "string",
|
|
317
|
+
validation: (Rule) => Rule.required(),
|
|
318
|
+
}),
|
|
319
|
+
defineField({
|
|
320
|
+
name: "description",
|
|
321
|
+
title: "Description",
|
|
322
|
+
type: "text",
|
|
323
|
+
rows: 2,
|
|
324
|
+
validation: (Rule) => Rule.required(),
|
|
325
|
+
}),
|
|
326
|
+
defineField({
|
|
327
|
+
name: "thumbnail",
|
|
328
|
+
title: "Thumbnail",
|
|
329
|
+
type: "image",
|
|
330
|
+
validation: (Rule) => Rule.required(),
|
|
331
|
+
}),
|
|
332
|
+
defineField({
|
|
333
|
+
name: "uploadDate",
|
|
334
|
+
title: "Upload Date",
|
|
335
|
+
type: "datetime",
|
|
336
|
+
validation: (Rule) => Rule.required(),
|
|
337
|
+
}),
|
|
338
|
+
defineField({
|
|
339
|
+
name: "contentUrl",
|
|
340
|
+
title: "Content URL",
|
|
341
|
+
type: "url",
|
|
342
|
+
description: "Direct link to the video file (.mp4, etc.).",
|
|
343
|
+
}),
|
|
344
|
+
defineField({
|
|
345
|
+
name: "embedUrl",
|
|
346
|
+
title: "Embed URL",
|
|
347
|
+
type: "url",
|
|
348
|
+
description: "Player embed URL (YouTube, Vimeo, etc.).",
|
|
349
|
+
}),
|
|
350
|
+
],
|
|
351
|
+
preview: {
|
|
352
|
+
select: { title: "name" },
|
|
353
|
+
prepare: ({ title }) => ({
|
|
354
|
+
title: title || "Video",
|
|
355
|
+
subtitle: "Video",
|
|
356
|
+
}),
|
|
357
|
+
},
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
export const customJsonLd = defineType({
|
|
361
|
+
name: "customJsonLd",
|
|
362
|
+
title: "Custom JSON-LD",
|
|
363
|
+
type: "object",
|
|
364
|
+
icon: customJsonLdIcon,
|
|
365
|
+
description:
|
|
366
|
+
"Optional JSON-LD block for advanced rich results (FAQ, Product, HowTo, etc.). Emits its own <script> tag. Validate snippets with https://search.google.com/test/rich-results — invalid blocks are skipped at render time.",
|
|
367
|
+
fields: [
|
|
368
|
+
defineField({
|
|
369
|
+
name: "label",
|
|
370
|
+
title: "Internal Label",
|
|
371
|
+
type: "string",
|
|
372
|
+
description:
|
|
373
|
+
"For your reference only (e.g. 'FAQ – pricing tiers'). Not emitted.",
|
|
374
|
+
validation: (Rule) => Rule.required(),
|
|
375
|
+
}),
|
|
376
|
+
defineField({
|
|
377
|
+
name: "json",
|
|
378
|
+
title: "JSON-LD",
|
|
379
|
+
type: "text",
|
|
380
|
+
rows: 10,
|
|
381
|
+
description:
|
|
382
|
+
"Paste a single schema.org JSON-LD object. Omit the <script> wrapper. Must include an @type (@context is added automatically if omitted).",
|
|
383
|
+
validation: (Rule) =>
|
|
384
|
+
Rule.required().custom((value) => {
|
|
385
|
+
if (typeof value !== "string" || value.trim() === "") {
|
|
386
|
+
return "JSON-LD is required";
|
|
387
|
+
}
|
|
388
|
+
try {
|
|
389
|
+
const parsed = JSON.parse(value);
|
|
390
|
+
if (Array.isArray(parsed)) {
|
|
391
|
+
return "Use one block per entry (split arrays into multiple blocks).";
|
|
392
|
+
}
|
|
393
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
394
|
+
return "Must be a JSON object.";
|
|
395
|
+
}
|
|
396
|
+
if (!("@type" in parsed)) {
|
|
397
|
+
return 'Must include an @type (e.g. "@type": "FAQPage").';
|
|
398
|
+
}
|
|
399
|
+
return true;
|
|
400
|
+
} catch {
|
|
401
|
+
return "Invalid JSON. Use https://jsonlint.com to debug.";
|
|
402
|
+
}
|
|
403
|
+
}),
|
|
404
|
+
}),
|
|
405
|
+
],
|
|
406
|
+
preview: {
|
|
407
|
+
select: { title: "label", subtitle: "json" },
|
|
408
|
+
prepare: ({ title, subtitle }) => {
|
|
409
|
+
let type: string | undefined;
|
|
410
|
+
if (typeof subtitle === "string") {
|
|
411
|
+
try {
|
|
412
|
+
const parsed = JSON.parse(subtitle);
|
|
413
|
+
if (parsed && typeof parsed === "object" && "@type" in parsed) {
|
|
414
|
+
type = String(parsed["@type"]);
|
|
415
|
+
}
|
|
416
|
+
} catch {
|
|
417
|
+
// ignore — render-time skips invalid blocks
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
return {
|
|
421
|
+
title: title || "Custom JSON-LD",
|
|
422
|
+
subtitle: type ? `@type: ${type}` : "JSON-LD",
|
|
423
|
+
};
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
export const pageJsonLdMembers = [
|
|
429
|
+
faqJsonLd,
|
|
430
|
+
eventJsonLd,
|
|
431
|
+
videoJsonLd,
|
|
432
|
+
jobPostingJsonLd,
|
|
433
|
+
softwareApplicationJsonLd,
|
|
434
|
+
itemListJsonLd,
|
|
435
|
+
customJsonLd,
|
|
436
|
+
] as const;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
companyDataIcon,
|
|
3
|
+
footerIcon,
|
|
4
|
+
navbarIcon,
|
|
5
|
+
pageListIcon,
|
|
6
|
+
structuredDataIcon,
|
|
7
|
+
} from "./icons";
|
|
8
|
+
|
|
9
|
+
export const singletonComponents = [
|
|
10
|
+
{
|
|
11
|
+
schemaType: "blogCollection",
|
|
12
|
+
documentId: "blogCollection",
|
|
13
|
+
title: "Blog Collection",
|
|
14
|
+
icon: pageListIcon,
|
|
15
|
+
},
|
|
16
|
+
] as const;
|
|
17
|
+
|
|
18
|
+
export const singletonLayout = [
|
|
19
|
+
{
|
|
20
|
+
schemaType: "companyData",
|
|
21
|
+
documentId: "companyData",
|
|
22
|
+
title: "Company Data",
|
|
23
|
+
icon: companyDataIcon,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
schemaType: "navbar",
|
|
27
|
+
documentId: "navbar",
|
|
28
|
+
title: "Navbar",
|
|
29
|
+
icon: navbarIcon,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
schemaType: "footer",
|
|
33
|
+
documentId: "footer",
|
|
34
|
+
title: "Footer",
|
|
35
|
+
icon: footerIcon,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
schemaType: "structuredData",
|
|
39
|
+
documentId: "structuredData",
|
|
40
|
+
title: "Structured Data",
|
|
41
|
+
icon: structuredDataIcon,
|
|
42
|
+
},
|
|
43
|
+
] as const;
|
|
44
|
+
|
|
45
|
+
export const singletonComponentTypes: Set<string> = new Set(
|
|
46
|
+
singletonComponents.map((item) => item.schemaType),
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
export const singletonLayoutTypes: Set<string> = new Set(
|
|
50
|
+
singletonLayout.map((item) => item.schemaType),
|
|
51
|
+
);
|