bsmnt 0.4.0 → 0.4.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/dist/{helpers/add → application/add-hooks}/index.d.ts +4 -4
- package/dist/application/add-hooks/index.d.ts.map +1 -0
- package/dist/{helpers/add → application/add-hooks}/index.js +22 -35
- package/dist/application/add-hooks/index.js.map +1 -0
- package/dist/{utils → application/add-integration}/format-results.d.ts +1 -6
- package/dist/application/add-integration/format-results.d.ts.map +1 -0
- package/dist/{utils → application/add-integration}/format-results.js +1 -6
- package/dist/application/add-integration/format-results.js.map +1 -0
- package/dist/{helpers/integrate → application/add-integration}/index.d.ts +2 -1
- package/dist/application/add-integration/index.d.ts.map +1 -0
- package/dist/{helpers/integrate → application/add-integration}/index.js +46 -41
- package/dist/application/add-integration/index.js.map +1 -0
- package/dist/application/create-project/build-context.d.ts +9 -0
- package/dist/application/create-project/build-context.d.ts.map +1 -0
- package/dist/application/create-project/build-context.js +13 -0
- package/dist/application/create-project/build-context.js.map +1 -0
- package/dist/application/create-project/index.d.ts +44 -0
- package/dist/application/create-project/index.d.ts.map +1 -0
- package/dist/application/create-project/index.js +70 -0
- package/dist/application/create-project/index.js.map +1 -0
- package/dist/application/create-project/map-selection-to-registry.d.ts +3 -0
- package/dist/application/create-project/map-selection-to-registry.d.ts.map +1 -0
- package/dist/application/create-project/map-selection-to-registry.js +30 -0
- package/dist/application/create-project/map-selection-to-registry.js.map +1 -0
- package/dist/application/create-project/resolve-selection.d.ts +15 -0
- package/dist/application/create-project/resolve-selection.d.ts.map +1 -0
- package/dist/application/create-project/resolve-selection.js +11 -0
- package/dist/application/create-project/resolve-selection.js.map +1 -0
- package/dist/{helpers/skills → application/install-skills}/index.d.ts +1 -1
- package/dist/application/install-skills/index.d.ts.map +1 -0
- package/dist/{helpers/skills → application/install-skills}/index.js +31 -44
- package/dist/application/install-skills/index.js.map +1 -0
- package/dist/{utils/detect-project.d.ts → application/shared/project-detection.d.ts} +8 -15
- package/dist/application/shared/project-detection.d.ts.map +1 -0
- package/dist/{utils/detect-project.js → application/shared/project-detection.js} +8 -24
- package/dist/application/shared/project-detection.js.map +1 -0
- package/dist/core/create/build-plan.d.ts +8 -0
- package/dist/core/create/build-plan.d.ts.map +1 -0
- package/dist/core/create/build-plan.js +89 -0
- package/dist/core/create/build-plan.js.map +1 -0
- package/dist/core/create/execute-plan.d.ts +23 -0
- package/dist/core/create/execute-plan.d.ts.map +1 -0
- package/dist/core/create/execute-plan.js +23 -0
- package/dist/core/create/execute-plan.js.map +1 -0
- package/dist/core/create/internal-ids.d.ts +23 -0
- package/dist/core/create/internal-ids.d.ts.map +1 -0
- package/dist/core/create/internal-ids.js +36 -0
- package/dist/core/create/internal-ids.js.map +1 -0
- package/dist/core/create/registry.d.ts +12 -0
- package/dist/core/create/registry.d.ts.map +1 -0
- package/dist/core/create/registry.js +33 -0
- package/dist/core/create/registry.js.map +1 -0
- package/dist/core/create/types.d.ts +96 -0
- package/dist/core/create/types.d.ts.map +1 -0
- package/dist/core/create/types.js +2 -0
- package/dist/core/create/types.js.map +1 -0
- package/dist/domain/agents.d.ts +61 -0
- package/dist/domain/agents.d.ts.map +1 -0
- package/dist/domain/agents.js +35 -0
- package/dist/domain/agents.js.map +1 -0
- package/dist/domain/animations.d.ts +20 -0
- package/dist/domain/animations.d.ts.map +1 -0
- package/dist/domain/animations.js +13 -0
- package/dist/domain/animations.js.map +1 -0
- package/dist/domain/cms.d.ts +24 -0
- package/dist/domain/cms.d.ts.map +1 -0
- package/dist/domain/cms.js +13 -0
- package/dist/domain/cms.js.map +1 -0
- package/dist/domain/hooks.d.ts +67 -0
- package/dist/domain/hooks.d.ts.map +1 -0
- package/dist/domain/hooks.js +52 -0
- package/dist/domain/hooks.js.map +1 -0
- package/dist/domain/skills.d.ts +70 -0
- package/dist/domain/skills.d.ts.map +1 -0
- package/dist/domain/skills.js +84 -0
- package/dist/domain/skills.js.map +1 -0
- package/dist/domain/templates.d.ts +51 -0
- package/dist/domain/templates.d.ts.map +1 -0
- package/dist/domain/templates.js +27 -0
- package/dist/domain/templates.js.map +1 -0
- package/dist/index.js +124 -115
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/agents/register-sanity-mcp.d.ts +12 -0
- package/dist/infrastructure/agents/register-sanity-mcp.d.ts.map +1 -0
- package/dist/infrastructure/agents/register-sanity-mcp.js +153 -0
- package/dist/infrastructure/agents/register-sanity-mcp.js.map +1 -0
- package/dist/infrastructure/create/apply-copy-paths.d.ts +3 -0
- package/dist/infrastructure/create/apply-copy-paths.d.ts.map +1 -0
- package/dist/infrastructure/create/apply-copy-paths.js +12 -0
- package/dist/infrastructure/create/apply-copy-paths.js.map +1 -0
- package/dist/infrastructure/create/apply-merge-paths.d.ts +3 -0
- package/dist/infrastructure/create/apply-merge-paths.d.ts.map +1 -0
- package/dist/infrastructure/create/apply-merge-paths.js +17 -0
- package/dist/infrastructure/create/apply-merge-paths.js.map +1 -0
- package/dist/infrastructure/create/apply-package-json.d.ts +8 -0
- package/dist/infrastructure/create/apply-package-json.d.ts.map +1 -0
- package/dist/infrastructure/create/apply-package-json.js +46 -0
- package/dist/infrastructure/create/apply-package-json.js.map +1 -0
- package/dist/infrastructure/create/copy-template.d.ts +10 -0
- package/dist/infrastructure/create/copy-template.d.ts.map +1 -0
- package/dist/infrastructure/create/copy-template.js.map +1 -0
- package/dist/infrastructure/create/executor.d.ts +3 -0
- package/dist/infrastructure/create/executor.d.ts.map +1 -0
- package/dist/infrastructure/create/executor.js +21 -0
- package/dist/infrastructure/create/executor.js.map +1 -0
- package/dist/{helpers/create/init-git.d.ts → infrastructure/create/init-git-repo.d.ts} +2 -3
- package/dist/infrastructure/create/init-git-repo.d.ts.map +1 -0
- package/dist/{helpers/create/init-git.js → infrastructure/create/init-git-repo.js} +1 -4
- package/dist/infrastructure/create/init-git-repo.js.map +1 -0
- package/dist/{helpers/create/install.d.ts → infrastructure/create/install-dependencies.d.ts} +1 -1
- package/dist/infrastructure/create/install-dependencies.d.ts.map +1 -0
- package/dist/{helpers/create/install.js → infrastructure/create/install-dependencies.js} +1 -1
- package/dist/infrastructure/create/install-dependencies.js.map +1 -0
- package/dist/infrastructure/create/lifecycle-registry.d.ts +3 -0
- package/dist/infrastructure/create/lifecycle-registry.d.ts.map +1 -0
- package/dist/infrastructure/create/lifecycle-registry.js +38 -0
- package/dist/infrastructure/create/lifecycle-registry.js.map +1 -0
- package/dist/infrastructure/create/merge-registry.d.ts +3 -0
- package/dist/infrastructure/create/merge-registry.d.ts.map +1 -0
- package/dist/infrastructure/create/merge-registry.js +27 -0
- package/dist/infrastructure/create/merge-registry.js.map +1 -0
- package/dist/infrastructure/create/rename-files.d.ts.map +1 -0
- package/dist/infrastructure/create/rename-files.js.map +1 -0
- package/dist/{helpers → infrastructure}/create/setup-agent.d.ts +9 -7
- package/dist/infrastructure/create/setup-agent.d.ts.map +1 -0
- package/dist/infrastructure/create/setup-agent.js +77 -0
- package/dist/infrastructure/create/setup-agent.js.map +1 -0
- package/dist/infrastructure/create/setup-sanity.d.ts.map +1 -0
- package/dist/{helpers → infrastructure}/create/setup-sanity.js +1 -19
- package/dist/infrastructure/create/setup-sanity.js.map +1 -0
- package/dist/infrastructure/integrations/inject-integration.d.ts +9 -0
- package/dist/infrastructure/integrations/inject-integration.d.ts.map +1 -0
- package/dist/{helpers/integrate/merge-orchestrator.js → infrastructure/integrations/inject-integration.js} +26 -38
- package/dist/infrastructure/integrations/inject-integration.js.map +1 -0
- package/dist/modules/features/agents/index.d.ts +3 -0
- package/dist/modules/features/agents/index.d.ts.map +1 -0
- package/dist/modules/features/agents/index.js +4 -0
- package/dist/modules/features/agents/index.js.map +1 -0
- package/dist/modules/features/agents/shared.d.ts +4 -0
- package/dist/modules/features/agents/shared.d.ts.map +1 -0
- package/dist/modules/features/agents/shared.js +21 -0
- package/dist/modules/features/agents/shared.js.map +1 -0
- package/dist/{configs/animations.d.ts → modules/features/animation/config.d.ts} +1 -1
- package/dist/modules/features/animation/config.d.ts.map +1 -0
- package/dist/{configs/animations.js → modules/features/animation/config.js} +1 -1
- package/dist/modules/features/animation/config.js.map +1 -0
- package/dist/modules/features/animation/gsap.d.ts +3 -0
- package/dist/modules/features/animation/gsap.d.ts.map +1 -0
- package/dist/modules/features/animation/gsap.js +16 -0
- package/dist/modules/features/animation/gsap.js.map +1 -0
- package/dist/modules/features/animation/index.d.ts +3 -0
- package/dist/modules/features/animation/index.d.ts.map +1 -0
- package/dist/modules/features/animation/index.js +4 -0
- package/dist/modules/features/animation/index.js.map +1 -0
- package/dist/modules/features/animation/motion.d.ts +3 -0
- package/dist/modules/features/animation/motion.d.ts.map +1 -0
- package/dist/modules/features/animation/motion.js +16 -0
- package/dist/modules/features/animation/motion.js.map +1 -0
- package/dist/modules/features/cms/index.d.ts +3 -0
- package/dist/modules/features/cms/index.d.ts.map +1 -0
- package/dist/modules/features/cms/index.js +7 -0
- package/dist/modules/features/cms/index.js.map +1 -0
- package/dist/modules/features/cms/sanity/config.d.ts.map +1 -0
- package/dist/{helpers/integrate → modules/features/cms}/sanity/config.js +3 -2
- package/dist/modules/features/cms/sanity/config.js.map +1 -0
- package/dist/modules/features/cms/sanity/index.d.ts +3 -0
- package/dist/modules/features/cms/sanity/index.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity/index.js +61 -0
- package/dist/modules/features/cms/sanity/index.js.map +1 -0
- package/dist/{helpers/integrate/sanity/mergers/check-integration-merger.d.ts → modules/features/cms/sanity/mergers/check-integration.d.ts} +1 -1
- package/dist/modules/features/cms/sanity/mergers/check-integration.d.ts.map +1 -0
- package/dist/{helpers/integrate/sanity/mergers/check-integration-merger.js → modules/features/cms/sanity/mergers/check-integration.js} +1 -1
- package/dist/modules/features/cms/sanity/mergers/check-integration.js.map +1 -0
- package/dist/{helpers/integrate/sanity/mergers/layout-merger.d.ts → modules/features/cms/sanity/mergers/layout.d.ts} +1 -1
- package/dist/modules/features/cms/sanity/mergers/layout.d.ts.map +1 -0
- package/dist/{helpers/integrate/sanity/mergers/layout-merger.js → modules/features/cms/sanity/mergers/layout.js} +1 -1
- package/dist/modules/features/cms/sanity/mergers/layout.js.map +1 -0
- package/dist/modules/features/cms/sanity/mergers/sitemap.d.ts +13 -0
- package/dist/modules/features/cms/sanity/mergers/sitemap.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity/mergers/sitemap.js +92 -0
- package/dist/modules/features/cms/sanity/mergers/sitemap.js.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder/config.d.ts +14 -0
- package/dist/modules/features/cms/sanity-pagebuilder/config.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder/config.js +44 -0
- package/dist/modules/features/cms/sanity-pagebuilder/config.js.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder/index.d.ts +3 -0
- package/dist/modules/features/cms/sanity-pagebuilder/index.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity-pagebuilder/index.js +46 -0
- package/dist/modules/features/cms/sanity-pagebuilder/index.js.map +1 -0
- package/dist/modules/features/hooks/factory.d.ts +4 -0
- package/dist/modules/features/hooks/factory.d.ts.map +1 -0
- package/dist/modules/features/hooks/factory.js +26 -0
- package/dist/modules/features/hooks/factory.js.map +1 -0
- package/dist/modules/features/hooks/index.d.ts +3 -0
- package/dist/modules/features/hooks/index.d.ts.map +1 -0
- package/dist/modules/features/hooks/index.js +4 -0
- package/dist/modules/features/hooks/index.js.map +1 -0
- package/dist/modules/presets/index.d.ts +3 -0
- package/dist/modules/presets/index.d.ts.map +1 -0
- package/dist/modules/presets/index.js +11 -0
- package/dist/modules/presets/index.js.map +1 -0
- package/dist/modules/presets/next-default.d.ts +3 -0
- package/dist/modules/presets/next-default.d.ts.map +1 -0
- package/dist/modules/presets/next-default.js +9 -0
- package/dist/modules/presets/next-default.js.map +1 -0
- package/dist/modules/presets/next-experiments.d.ts +3 -0
- package/dist/modules/presets/next-experiments.d.ts.map +1 -0
- package/dist/modules/presets/next-experiments.js +9 -0
- package/dist/modules/presets/next-experiments.js.map +1 -0
- package/dist/modules/presets/next-pagebuilder.d.ts +3 -0
- package/dist/modules/presets/next-pagebuilder.d.ts.map +1 -0
- package/dist/modules/presets/next-pagebuilder.js +10 -0
- package/dist/modules/presets/next-pagebuilder.js.map +1 -0
- package/dist/modules/presets/next-webgl.d.ts +3 -0
- package/dist/modules/presets/next-webgl.d.ts.map +1 -0
- package/dist/modules/presets/next-webgl.js +9 -0
- package/dist/modules/presets/next-webgl.js.map +1 -0
- package/dist/paths.d.ts +7 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +8 -2
- package/dist/paths.js.map +1 -1
- package/index.js +2 -2
- package/package.json +11 -4
- package/src/modules/features/cms/sanity/files/.knip.json +8 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/blog/[slug]/route.ts +3 -4
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/revalidate/route.ts +1 -4
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/blog/[slug]/page.tsx +8 -9
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/layout.tsx +2 -2
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/sitemap.md/route.ts +18 -29
- package/src/modules/features/cms/sanity/files/app/sitemap.xml/route.ts +51 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/env.ts +2 -4
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/queries.ts +0 -42
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/index.ts +1 -1
- package/src/modules/features/cms/sanity/files/lib/scripts/copy-sanity-mcp.ts +23 -0
- package/src/modules/features/cms/sanity/files/lib/scripts/generate-page.ts +297 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/json-ld.tsx +1 -6
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/metadata.ts +2 -2
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/url.ts +4 -2
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/proxy.ts +11 -11
- package/src/template-hooks/use-device-perf.ts +27 -17
- package/src/templates/next-default/.env.example +3 -3
- package/src/templates/next-default/.vscode/extensions.json +1 -5
- package/src/templates/next-default/.vscode/settings.json +1 -1
- package/src/templates/next-default/.zed/settings.json +47 -0
- package/src/templates/next-default/README.md +7 -6
- package/src/templates/next-default/_gitignore +1 -3
- package/src/templates/next-default/app/layout.tsx +21 -35
- package/src/templates/next-default/app/robots.ts +3 -4
- package/src/templates/next-default/app/sitemap.xml/route.ts +29 -29
- package/src/templates/next-default/biome.json +9 -2
- package/src/templates/next-default/components/ui/image/index.tsx +2 -1
- package/src/templates/next-default/components/ui/link/index.tsx +35 -35
- package/src/templates/next-default/lefthook.yml +25 -0
- package/src/templates/next-default/lib/README.md +8 -4
- package/src/templates/next-default/lib/hooks/use-media.ts +6 -3
- package/src/templates/next-default/lib/scripts/dev.ts +32 -0
- package/src/templates/next-default/lib/styles/README.md +13 -0
- package/src/templates/next-default/lib/styles/fonts.ts +20 -0
- package/src/templates/next-default/lib/styles/global.css +15 -196
- package/src/templates/next-default/lib/styles/index.css +3 -0
- package/src/templates/next-default/lib/styles/tokens.css +182 -0
- package/src/templates/next-default/lib/utils/README.md +40 -0
- package/src/templates/next-default/lib/utils/easings.ts +240 -0
- package/src/templates/next-default/lib/utils/fetch.ts +84 -0
- package/src/templates/next-default/lib/utils/global-css.d.ts +1 -0
- package/src/templates/next-default/lib/utils/json-ld.tsx +70 -68
- package/src/templates/next-default/lib/utils/math.ts +236 -0
- package/src/templates/next-default/lib/utils/metadata.ts +26 -27
- package/src/templates/next-default/lib/utils/strings.ts +246 -0
- package/src/templates/next-default/lib/utils/types.d.ts +15 -0
- package/src/templates/next-default/lib/utils/url.ts +8 -5
- package/src/templates/next-default/lib/utils/viewport.ts +199 -0
- package/src/templates/next-default/package.json +12 -7
- package/src/templates/next-default/svg.d.ts +1 -0
- package/src/templates/next-experiments/.env.example +3 -3
- package/src/templates/next-experiments/.knip.json +3 -0
- package/src/templates/next-experiments/.vscode/extensions.json +1 -5
- package/src/templates/next-experiments/.vscode/settings.json +1 -1
- package/src/templates/next-experiments/.zed/settings.json +47 -0
- package/src/templates/next-experiments/README.md +7 -6
- package/src/templates/next-experiments/_gitignore +1 -3
- package/src/templates/next-experiments/app/layout.tsx +21 -35
- package/src/templates/next-experiments/app/robots.ts +5 -2
- package/src/templates/next-experiments/app/sitemap.xml/route.ts +51 -0
- package/src/templates/next-experiments/biome.json +4 -2
- package/src/templates/next-experiments/components/layout/navigation-menu.tsx +1 -1
- package/src/templates/next-experiments/components/layout/wrapper/index.tsx +6 -6
- package/src/templates/next-experiments/components/ui/image/index.tsx +33 -33
- package/src/templates/next-experiments/lib/README.md +8 -4
- package/src/templates/next-experiments/lib/hooks/use-media.ts +6 -3
- package/src/templates/next-experiments/lib/scripts/dev.ts +32 -0
- package/src/templates/next-experiments/lib/styles/README.md +13 -0
- package/src/templates/next-experiments/lib/styles/fonts.ts +20 -0
- package/src/templates/next-experiments/lib/styles/global.css +16 -196
- package/src/templates/next-experiments/lib/styles/index.css +3 -0
- package/src/templates/next-experiments/lib/styles/tokens.css +182 -0
- package/src/templates/next-experiments/lib/utils/README.md +40 -0
- package/src/templates/next-experiments/lib/utils/easings.ts +240 -0
- package/src/templates/next-experiments/lib/utils/fetch.ts +84 -0
- package/src/templates/next-experiments/lib/utils/global-css.d.ts +1 -0
- package/src/templates/next-experiments/lib/utils/json-ld.tsx +70 -68
- package/src/templates/next-experiments/lib/utils/math.ts +236 -0
- package/src/templates/next-experiments/lib/utils/metadata.ts +26 -27
- package/src/templates/next-experiments/lib/utils/strings.ts +246 -0
- package/src/templates/next-experiments/lib/utils/types.d.ts +15 -0
- package/src/templates/next-experiments/lib/utils/url.ts +8 -5
- package/src/templates/next-experiments/lib/utils/viewport.ts +199 -0
- package/src/templates/next-experiments/package.json +6 -6
- package/src/templates/next-experiments/svg.d.ts +1 -0
- package/src/templates/next-pagebuilder/.vscode/extensions.json +16 -0
- package/src/templates/next-pagebuilder/.vscode/settings.json +105 -0
- package/src/templates/next-pagebuilder/.zed/settings.json +47 -0
- package/src/templates/next-pagebuilder/_gitignore +1 -3
- package/src/templates/next-pagebuilder/app/(content)/[[...slug]]/page.tsx +17 -8
- package/src/templates/next-pagebuilder/app/(content)/layout.tsx +18 -7
- package/src/templates/next-pagebuilder/app/actions/refresh.ts +5 -0
- package/src/templates/next-pagebuilder/app/robots.ts +3 -4
- package/src/templates/next-pagebuilder/biome.json +17 -0
- package/src/templates/next-pagebuilder/components/layout/footer/index.tsx +17 -22
- package/src/templates/next-pagebuilder/components/layout/header/index.tsx +3 -5
- package/src/templates/next-pagebuilder/components/layout/json-ld/index.tsx +11 -10
- package/src/templates/next-pagebuilder/components/layout/wrapper/index.tsx +14 -4
- package/src/templates/next-pagebuilder/components/page-builder/components/article-content/index.tsx +4 -9
- package/src/templates/next-pagebuilder/components/page-builder/components/article-content/related-post-item.tsx +4 -4
- package/src/templates/next-pagebuilder/components/page-builder/components/{post-collection → content-collection}/content-card.tsx +2 -2
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/content-filters.tsx +93 -0
- package/src/templates/next-pagebuilder/components/page-builder/components/{post-collection → content-collection}/content-grid.tsx +7 -9
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/content-pagination-nav.tsx +71 -0
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/index.tsx +219 -0
- package/src/templates/next-pagebuilder/components/page-builder/components/{post-collection → content-collection}/types.ts +7 -4
- package/src/templates/next-pagebuilder/components/page-builder/renderer.tsx +17 -5
- package/src/templates/next-pagebuilder/components/page-builder/types.ts +9 -7
- package/src/templates/next-pagebuilder/components/page-document/index.tsx +19 -4
- package/src/templates/next-pagebuilder/lefthook.yml +25 -0
- package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.types.ts +208 -0
- package/src/templates/next-pagebuilder/lib/styles/global.css +0 -1
- package/src/templates/next-pagebuilder/next.config.ts +1 -0
- package/src/templates/next-pagebuilder/package.json +13 -26
- package/src/templates/next-pagebuilder/postcss.config.mjs +27 -1
- package/src/templates/next-pagebuilder/svg.d.ts +1 -0
- package/src/templates/next-webgl/.env.example +3 -3
- package/src/templates/next-webgl/.vscode/extensions.json +1 -5
- package/src/templates/next-webgl/.vscode/settings.json +1 -1
- package/src/templates/next-webgl/.zed/settings.json +47 -0
- package/src/templates/next-webgl/README.md +7 -6
- package/src/templates/next-webgl/_gitignore +1 -3
- package/src/templates/next-webgl/app/layout.tsx +21 -35
- package/src/templates/next-webgl/app/robots.ts +3 -4
- package/src/templates/next-webgl/app/sitemap.xml/route.ts +29 -29
- package/src/templates/next-webgl/biome.json +9 -2
- package/src/templates/next-webgl/components/ui/image/index.tsx +2 -1
- package/src/templates/next-webgl/components/webgl/components/scene/index.tsx +0 -2
- package/src/templates/next-webgl/lefthook.yml +25 -0
- package/src/templates/next-webgl/lib/README.md +8 -4
- package/src/templates/next-webgl/lib/hooks/use-media.ts +6 -3
- package/src/templates/next-webgl/lib/scripts/dev.ts +32 -0
- package/src/templates/next-webgl/lib/styles/README.md +13 -0
- package/src/templates/next-webgl/lib/styles/fonts.ts +20 -0
- package/src/templates/next-webgl/lib/styles/global.css +16 -196
- package/src/templates/next-webgl/lib/styles/index.css +3 -0
- package/src/templates/next-webgl/lib/styles/tokens.css +182 -0
- package/src/templates/next-webgl/lib/utils/README.md +40 -0
- package/src/templates/next-webgl/lib/utils/easings.ts +240 -0
- package/src/templates/next-webgl/lib/utils/fetch.ts +84 -0
- package/src/templates/next-webgl/lib/utils/global-css.d.ts +1 -0
- package/src/templates/next-webgl/lib/utils/json-ld.tsx +70 -68
- package/src/templates/next-webgl/lib/utils/math.ts +236 -0
- package/src/templates/next-webgl/lib/utils/metadata.ts +26 -27
- package/src/templates/next-webgl/lib/utils/strings.ts +246 -0
- package/src/templates/next-webgl/lib/utils/types.d.ts +15 -0
- package/src/templates/next-webgl/lib/utils/url.ts +8 -5
- package/src/templates/next-webgl/lib/utils/viewport.ts +199 -0
- package/src/templates/next-webgl/package.json +13 -8
- package/src/templates/next-webgl/svg.d.ts +1 -0
- package/src/templates/next-webgl/tsconfig.tsbuildinfo +1 -1
- package/dist/configs/animations.d.ts.map +0 -1
- package/dist/configs/animations.js.map +0 -1
- package/dist/configs/skills.d.ts +0 -27
- package/dist/configs/skills.d.ts.map +0 -1
- package/dist/configs/skills.js +0 -18
- package/dist/configs/skills.js.map +0 -1
- package/dist/configs/skills.json +0 -26
- package/dist/helpers/add/hooks-config.d.ts +0 -22
- package/dist/helpers/add/hooks-config.d.ts.map +0 -1
- package/dist/helpers/add/hooks-config.js +0 -31
- package/dist/helpers/add/hooks-config.js.map +0 -1
- package/dist/helpers/add/index.d.ts.map +0 -1
- package/dist/helpers/add/index.js.map +0 -1
- package/dist/helpers/create/copy-template.d.ts +0 -11
- package/dist/helpers/create/copy-template.d.ts.map +0 -1
- package/dist/helpers/create/copy-template.js.map +0 -1
- package/dist/helpers/create/index.d.ts +0 -24
- package/dist/helpers/create/index.d.ts.map +0 -1
- package/dist/helpers/create/index.js +0 -99
- package/dist/helpers/create/index.js.map +0 -1
- package/dist/helpers/create/init-git.d.ts.map +0 -1
- package/dist/helpers/create/init-git.js.map +0 -1
- package/dist/helpers/create/install.d.ts.map +0 -1
- package/dist/helpers/create/install.js.map +0 -1
- package/dist/helpers/create/rename-files.d.ts.map +0 -1
- package/dist/helpers/create/rename-files.js.map +0 -1
- package/dist/helpers/create/setup-agent.d.ts.map +0 -1
- package/dist/helpers/create/setup-agent.js +0 -91
- package/dist/helpers/create/setup-agent.js.map +0 -1
- package/dist/helpers/create/setup-sanity.d.ts.map +0 -1
- package/dist/helpers/create/setup-sanity.js.map +0 -1
- package/dist/helpers/create/update-package.d.ts +0 -20
- package/dist/helpers/create/update-package.d.ts.map +0 -1
- package/dist/helpers/create/update-package.js +0 -97
- package/dist/helpers/create/update-package.js.map +0 -1
- package/dist/helpers/integrate/index.d.ts.map +0 -1
- package/dist/helpers/integrate/index.js.map +0 -1
- package/dist/helpers/integrate/merge-config.d.ts +0 -21
- package/dist/helpers/integrate/merge-config.d.ts.map +0 -1
- package/dist/helpers/integrate/merge-config.js +0 -42
- package/dist/helpers/integrate/merge-config.js.map +0 -1
- package/dist/helpers/integrate/merge-orchestrator.d.ts +0 -10
- package/dist/helpers/integrate/merge-orchestrator.d.ts.map +0 -1
- package/dist/helpers/integrate/merge-orchestrator.js.map +0 -1
- package/dist/helpers/integrate/sanity/config.d.ts.map +0 -1
- package/dist/helpers/integrate/sanity/config.js.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/check-integration-merger.d.ts.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/check-integration-merger.js.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/layout-merger.d.ts.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/layout-merger.js.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/sitemap-merger.d.ts +0 -11
- package/dist/helpers/integrate/sanity/mergers/sitemap-merger.d.ts.map +0 -1
- package/dist/helpers/integrate/sanity/mergers/sitemap-merger.js +0 -133
- package/dist/helpers/integrate/sanity/mergers/sitemap-merger.js.map +0 -1
- package/dist/helpers/skills/index.d.ts.map +0 -1
- package/dist/helpers/skills/index.js.map +0 -1
- package/dist/utils/detect-project.d.ts.map +0 -1
- package/dist/utils/detect-project.js.map +0 -1
- package/dist/utils/format-results.d.ts.map +0 -1
- package/dist/utils/format-results.js.map +0 -1
- package/src/helpers/integrate/sanity/files/lib/integrations/sanity/WEBHOOK-SETUP.md +0 -74
- package/src/helpers/integrate/sanity/files/lib/integrations/sanity/sitemap.ts +0 -90
- package/src/template-hooks/config.js +0 -32
- package/src/templates/next-default/css.d.ts +0 -1
- package/src/templates/next-default/lib/utils/portable-text-to-markdown.ts +0 -83
- package/src/templates/next-default/tsconfig.tsbuildinfo +0 -1
- package/src/templates/next-experiments/css.d.ts +0 -1
- package/src/templates/next-experiments/lib/utils/portable-text-to-markdown.ts +0 -83
- package/src/templates/next-pagebuilder/app/api/[[...slug]]/route.ts +0 -100
- package/src/templates/next-pagebuilder/app/api/draft-mode/disable/route.ts +0 -7
- package/src/templates/next-pagebuilder/app/api/draft-mode/enable/route.ts +0 -20
- package/src/templates/next-pagebuilder/app/api/revalidate/route.ts +0 -121
- package/src/templates/next-pagebuilder/app/sitemap.md/route.ts +0 -124
- package/src/templates/next-pagebuilder/app/studio/[[...tool]]/page.tsx +0 -8
- package/src/templates/next-pagebuilder/components/page-builder/components/post-collection/index.tsx +0 -28
- package/src/templates/next-pagebuilder/components/sanity/draft-mode-toggle.tsx +0 -27
- package/src/templates/next-pagebuilder/components/sanity/rich-text.tsx +0 -87
- package/src/templates/next-pagebuilder/components/sanity/visual-editing.tsx +0 -27
- package/src/templates/next-pagebuilder/components/ui/sanity-image/index.tsx +0 -41
- package/src/templates/next-pagebuilder/lib/integrations/check-integration.ts +0 -5
- package/src/templates/next-pagebuilder/lib/integrations/sanity/client.ts +0 -27
- package/src/templates/next-pagebuilder/lib/integrations/sanity/components/disable-draft-mode.tsx +0 -23
- package/src/templates/next-pagebuilder/lib/integrations/sanity/components/page-builder-input.tsx +0 -36
- package/src/templates/next-pagebuilder/lib/integrations/sanity/components/page-category-input.tsx +0 -50
- package/src/templates/next-pagebuilder/lib/integrations/sanity/components/rich-text.tsx +0 -84
- package/src/templates/next-pagebuilder/lib/integrations/sanity/confirm-publish-action.ts +0 -40
- package/src/templates/next-pagebuilder/lib/integrations/sanity/env.ts +0 -34
- package/src/templates/next-pagebuilder/lib/integrations/sanity/fetchers/layout.ts +0 -35
- package/src/templates/next-pagebuilder/lib/integrations/sanity/icons.ts +0 -58
- package/src/templates/next-pagebuilder/lib/integrations/sanity/live/index.tsx +0 -61
- package/src/templates/next-pagebuilder/lib/integrations/sanity/markdown-proxy.config.ts +0 -50
- package/src/templates/next-pagebuilder/lib/integrations/sanity/page-builder-config.ts +0 -132
- package/src/templates/next-pagebuilder/lib/integrations/sanity/page-category.ts +0 -28
- package/src/templates/next-pagebuilder/lib/integrations/sanity/queries.ts +0 -281
- package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.cli.ts +0 -29
- package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.config.ts +0 -211
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/index.ts +0 -4
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/reusable/blog-content.ts +0 -89
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/reusable/description.ts +0 -29
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/reusable/hero.ts +0 -28
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/singleton/content-collection.ts +0 -45
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/content/author.ts +0 -70
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/content/blog-category.ts +0 -55
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/index.ts +0 -96
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/layout/company-data.ts +0 -62
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/layout/footer.ts +0 -79
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/layout/navbar.ts +0 -74
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/link.ts +0 -125
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/logo-field.ts +0 -9
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/metadata.ts +0 -68
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/nav-objects.ts +0 -192
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/page-builder.ts +0 -39
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/page-folder.ts +0 -124
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/page.ts +0 -232
- package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/richText.ts +0 -63
- package/src/templates/next-pagebuilder/lib/integrations/sanity/singletons.ts +0 -44
- package/src/templates/next-pagebuilder/lib/integrations/sanity/structure.ts +0 -453
- package/src/templates/next-pagebuilder/lib/integrations/sanity/utils/image.ts +0 -8
- package/src/templates/next-pagebuilder/lib/integrations/sanity/utils/link.ts +0 -137
- package/src/templates/next-pagebuilder/lib/integrations/sanity/utils/page-builder-markdown.ts +0 -81
- package/src/templates/next-pagebuilder/lib/scripts/sanity-typegen.ts +0 -45
- package/src/templates/next-pagebuilder/lib/utils/json-ld.tsx +0 -213
- package/src/templates/next-pagebuilder/lib/utils/metadata.ts +0 -167
- package/src/templates/next-pagebuilder/lib/utils/sitemap.ts +0 -37
- package/src/templates/next-pagebuilder/proxy.ts +0 -81
- package/src/templates/next-webgl/css.d.ts +0 -1
- package/src/templates/next-webgl/lib/utils/portable-text-to-markdown.ts +0 -83
- package/dist/{helpers → infrastructure}/create/copy-template.js +0 -0
- package/dist/{helpers → infrastructure}/create/rename-files.d.ts +0 -0
- package/dist/{helpers → infrastructure}/create/rename-files.js +0 -0
- package/dist/{helpers → infrastructure}/create/setup-sanity.d.ts +0 -0
- package/dist/{helpers/integrate → modules/features/cms}/sanity/config.d.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/draft-mode/disable/route.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/draft-mode/enable/route.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/studio/[[...tool]]/page.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/studio/layout.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/components/ui/sanity-image/index.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/README.md +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/check-integration.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/MARKDOWN-PROXY.md +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/README.md +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/client.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/components/disable-draft-mode.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/components/rich-text.tsx +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/confirm-publish-action.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/live/index.tsx +1 -1
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/markdown-proxy.config.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/sanity.cli.ts +0 -0
- package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/sanity.config.ts +1 -1
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/sanity.types.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schema.json +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/article.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/example.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/link.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/metadata.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/navigation.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/richText.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/structure.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/utils/image.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/utils/link.ts +0 -0
- /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/portable-text-to-markdown.ts +0 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Easing Functions
|
|
3
|
+
*
|
|
4
|
+
* A complete collection of easing curves for animations.
|
|
5
|
+
* All functions take a progress value (0-1) and return an eased value (0-1).
|
|
6
|
+
*
|
|
7
|
+
* @see https://easings.net for visual references
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { easings, type EasingName } from '@/utils/easings'
|
|
12
|
+
*
|
|
13
|
+
* // Direct usage
|
|
14
|
+
* const eased = easings.easeOutCubic(0.5)
|
|
15
|
+
*
|
|
16
|
+
* // With a variable easing name
|
|
17
|
+
* const easingName: EasingName = 'easeInOutQuart'
|
|
18
|
+
* const value = easings[easingName](progress)
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* ## Choosing an Easing
|
|
22
|
+
*
|
|
23
|
+
* | Category | Use Case |
|
|
24
|
+
* |----------|----------|
|
|
25
|
+
* | `easeOut*` | UI feedback, appearing elements (most common) |
|
|
26
|
+
* | `easeIn*` | Exiting elements, building tension |
|
|
27
|
+
* | `easeInOut*` | State transitions, loading indicators |
|
|
28
|
+
* | `*Cubic/Quart` | Natural, balanced motion |
|
|
29
|
+
* | `*Expo` | Dramatic, snappy motion |
|
|
30
|
+
* | `*Elastic/Bounce` | Playful, attention-grabbing |
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
const pow = Math.pow
|
|
34
|
+
const sqrt = Math.sqrt
|
|
35
|
+
const sin = Math.sin
|
|
36
|
+
const cos = Math.cos
|
|
37
|
+
const PI = Math.PI
|
|
38
|
+
|
|
39
|
+
// Easing constants
|
|
40
|
+
const c1 = 1.70158
|
|
41
|
+
const c2 = c1 * 1.525
|
|
42
|
+
const c3 = c1 + 1
|
|
43
|
+
const c4 = (2 * PI) / 3
|
|
44
|
+
const c5 = (2 * PI) / 4.5
|
|
45
|
+
|
|
46
|
+
/** Bounce out helper (used by bounce easings) */
|
|
47
|
+
const bounceOut = (x: number): number => {
|
|
48
|
+
const n1 = 7.5625
|
|
49
|
+
const d1 = 2.75
|
|
50
|
+
|
|
51
|
+
if (x < 1 / d1) {
|
|
52
|
+
return n1 * x * x
|
|
53
|
+
}
|
|
54
|
+
if (x < 2 / d1) {
|
|
55
|
+
return n1 * (x - 1.5 / d1) * x + 0.75
|
|
56
|
+
}
|
|
57
|
+
if (x < 2.5 / d1) {
|
|
58
|
+
return n1 * (x - 2.25 / d1) * x + 0.9375
|
|
59
|
+
}
|
|
60
|
+
return n1 * (x - 2.625 / d1) * x + 0.984375
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Collection of easing functions.
|
|
65
|
+
* Each function takes progress (0-1) and returns eased value (0-1).
|
|
66
|
+
*/
|
|
67
|
+
export const easings = {
|
|
68
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
69
|
+
// Linear (no easing)
|
|
70
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
71
|
+
|
|
72
|
+
/** No easing - constant speed */
|
|
73
|
+
linear: (x: number): number => x,
|
|
74
|
+
|
|
75
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
76
|
+
// Quadratic (power of 2)
|
|
77
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
78
|
+
|
|
79
|
+
/** Slow start */
|
|
80
|
+
easeInQuad: (x: number): number => x * x,
|
|
81
|
+
|
|
82
|
+
/** Slow end */
|
|
83
|
+
easeOutQuad: (x: number): number => 1 - (1 - x) * (1 - x),
|
|
84
|
+
|
|
85
|
+
/** Slow start and end */
|
|
86
|
+
easeInOutQuad: (x: number): number =>
|
|
87
|
+
x < 0.5 ? 2 * x * x : 1 - pow(-2 * x + 2, 2) / 2,
|
|
88
|
+
|
|
89
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
90
|
+
// Cubic (power of 3) - Most commonly used
|
|
91
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
92
|
+
|
|
93
|
+
/** Slow start, natural feel */
|
|
94
|
+
easeInCubic: (x: number): number => x * x * x,
|
|
95
|
+
|
|
96
|
+
/** Slow end, natural feel - great for UI interactions */
|
|
97
|
+
easeOutCubic: (x: number): number => 1 - pow(1 - x, 3),
|
|
98
|
+
|
|
99
|
+
/** Smooth start and end - great for transitions */
|
|
100
|
+
easeInOutCubic: (x: number): number =>
|
|
101
|
+
x < 0.5 ? 4 * x * x * x : 1 - pow(-2 * x + 2, 3) / 2,
|
|
102
|
+
|
|
103
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
104
|
+
// Quartic (power of 4)
|
|
105
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
106
|
+
|
|
107
|
+
/** Slower start than cubic */
|
|
108
|
+
easeInQuart: (x: number): number => x * x * x * x,
|
|
109
|
+
|
|
110
|
+
/** Slower end than cubic */
|
|
111
|
+
easeOutQuart: (x: number): number => 1 - pow(1 - x, 4),
|
|
112
|
+
|
|
113
|
+
/** More pronounced ease than cubic */
|
|
114
|
+
easeInOutQuart: (x: number): number =>
|
|
115
|
+
x < 0.5 ? 8 * x * x * x * x : 1 - pow(-2 * x + 2, 4) / 2,
|
|
116
|
+
|
|
117
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
118
|
+
// Quintic (power of 5)
|
|
119
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
120
|
+
|
|
121
|
+
/** Very slow start */
|
|
122
|
+
easeInQuint: (x: number): number => x * x * x * x * x,
|
|
123
|
+
|
|
124
|
+
/** Very slow end */
|
|
125
|
+
easeOutQuint: (x: number): number => 1 - pow(1 - x, 5),
|
|
126
|
+
|
|
127
|
+
/** Very pronounced ease */
|
|
128
|
+
easeInOutQuint: (x: number): number =>
|
|
129
|
+
x < 0.5 ? 16 * x * x * x * x * x : 1 - pow(-2 * x + 2, 5) / 2,
|
|
130
|
+
|
|
131
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
132
|
+
// Sinusoidal - Gentle, wave-like
|
|
133
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
134
|
+
|
|
135
|
+
/** Gentle slow start */
|
|
136
|
+
easeInSine: (x: number): number => 1 - cos((x * PI) / 2),
|
|
137
|
+
|
|
138
|
+
/** Gentle slow end */
|
|
139
|
+
easeOutSine: (x: number): number => sin((x * PI) / 2),
|
|
140
|
+
|
|
141
|
+
/** Gentle ease both ends */
|
|
142
|
+
easeInOutSine: (x: number): number => -(cos(PI * x) - 1) / 2,
|
|
143
|
+
|
|
144
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
145
|
+
// Exponential - Dramatic, snappy
|
|
146
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
147
|
+
|
|
148
|
+
/** Dramatic slow start - almost stationary then fast */
|
|
149
|
+
easeInExpo: (x: number): number => (x === 0 ? 0 : pow(2, 10 * x - 10)),
|
|
150
|
+
|
|
151
|
+
/** Dramatic slow end - fast then almost stops */
|
|
152
|
+
easeOutExpo: (x: number): number => (x === 1 ? 1 : 1 - pow(2, -10 * x)),
|
|
153
|
+
|
|
154
|
+
/** Dramatic both ends */
|
|
155
|
+
easeInOutExpo: (x: number): number => {
|
|
156
|
+
if (x === 0) return 0
|
|
157
|
+
if (x === 1) return 1
|
|
158
|
+
if (x < 0.5) return pow(2, 20 * x - 10) / 2
|
|
159
|
+
return (2 - pow(2, -20 * x + 10)) / 2
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
163
|
+
// Circular - Based on circle quarter
|
|
164
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
165
|
+
|
|
166
|
+
/** Circular slow start */
|
|
167
|
+
easeInCirc: (x: number): number => 1 - sqrt(1 - pow(x, 2)),
|
|
168
|
+
|
|
169
|
+
/** Circular slow end */
|
|
170
|
+
easeOutCirc: (x: number): number => sqrt(1 - pow(x - 1, 2)),
|
|
171
|
+
|
|
172
|
+
/** Circular both ends */
|
|
173
|
+
easeInOutCirc: (x: number): number =>
|
|
174
|
+
x < 0.5
|
|
175
|
+
? (1 - sqrt(1 - pow(2 * x, 2))) / 2
|
|
176
|
+
: (sqrt(1 - pow(-2 * x + 2, 2)) + 1) / 2,
|
|
177
|
+
|
|
178
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
179
|
+
// Back - Overshoots then returns
|
|
180
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
181
|
+
|
|
182
|
+
/** Pulls back before accelerating */
|
|
183
|
+
easeInBack: (x: number): number => c3 * x * x * x - c1 * x * x,
|
|
184
|
+
|
|
185
|
+
/** Overshoots target then settles */
|
|
186
|
+
easeOutBack: (x: number): number =>
|
|
187
|
+
1 + c3 * pow(x - 1, 3) + c1 * pow(x - 1, 2),
|
|
188
|
+
|
|
189
|
+
/** Pulls back, overshoots, settles */
|
|
190
|
+
easeInOutBack: (x: number): number =>
|
|
191
|
+
x < 0.5
|
|
192
|
+
? (pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2)) / 2
|
|
193
|
+
: (pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
|
|
194
|
+
|
|
195
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
196
|
+
// Elastic - Spring-like oscillation
|
|
197
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
198
|
+
|
|
199
|
+
/** Wobbles at start */
|
|
200
|
+
easeInElastic: (x: number): number => {
|
|
201
|
+
if (x === 0) return 0
|
|
202
|
+
if (x === 1) return 1
|
|
203
|
+
return -pow(2, 10 * x - 10) * sin((x * 10 - 10.75) * c4)
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
/** Wobbles at end - great for attention */
|
|
207
|
+
easeOutElastic: (x: number): number => {
|
|
208
|
+
if (x === 0) return 0
|
|
209
|
+
if (x === 1) return 1
|
|
210
|
+
return pow(2, -10 * x) * sin((x * 10 - 0.75) * c4) + 1
|
|
211
|
+
},
|
|
212
|
+
|
|
213
|
+
/** Wobbles both ends */
|
|
214
|
+
easeInOutElastic: (x: number): number => {
|
|
215
|
+
if (x === 0) return 0
|
|
216
|
+
if (x === 1) return 1
|
|
217
|
+
if (x < 0.5) return -(pow(2, 20 * x - 10) * sin((20 * x - 11.125) * c5)) / 2
|
|
218
|
+
return (pow(2, -20 * x + 10) * sin((20 * x - 11.125) * c5)) / 2 + 1
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
222
|
+
// Bounce - Ball bouncing effect
|
|
223
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
224
|
+
|
|
225
|
+
/** Bounces at start */
|
|
226
|
+
easeInBounce: (x: number): number => 1 - bounceOut(1 - x),
|
|
227
|
+
|
|
228
|
+
/** Bounces at end - like a ball settling */
|
|
229
|
+
easeOutBounce: bounceOut,
|
|
230
|
+
|
|
231
|
+
/** Bounces both ends */
|
|
232
|
+
easeInOutBounce: (x: number): number =>
|
|
233
|
+
x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2,
|
|
234
|
+
} as const
|
|
235
|
+
|
|
236
|
+
/** All available easing function names */
|
|
237
|
+
export type EasingName = keyof typeof easings
|
|
238
|
+
|
|
239
|
+
/** An easing function signature */
|
|
240
|
+
export type EasingFunction = (progress: number) => number
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetch Utilities
|
|
3
|
+
*
|
|
4
|
+
* Wrapper around fetch that adds timeout protection to prevent hanging requests.
|
|
5
|
+
* Use this for all external API calls to improve reliability.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface FetchWithTimeoutOptions extends RequestInit {
|
|
9
|
+
timeout?: number // Timeout in milliseconds (default: 10000ms)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Fetch with automatic timeout protection
|
|
14
|
+
*
|
|
15
|
+
* @param url - The URL to fetch
|
|
16
|
+
* @param options - Fetch options with optional timeout
|
|
17
|
+
* @returns Promise<Response>
|
|
18
|
+
* @throws AbortError if timeout is reached
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* try {
|
|
23
|
+
* const response = await fetchWithTimeout('https://api.example.com/data', {
|
|
24
|
+
* timeout: 5000, // 5 second timeout
|
|
25
|
+
* method: 'POST',
|
|
26
|
+
* body: JSON.stringify(data)
|
|
27
|
+
* })
|
|
28
|
+
* const result = await response.json()
|
|
29
|
+
* } catch (error) {
|
|
30
|
+
* if (error.name === 'AbortError') {
|
|
31
|
+
* console.error('Request timed out')
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export async function fetchWithTimeout(
|
|
37
|
+
url: string,
|
|
38
|
+
options: FetchWithTimeoutOptions = {}
|
|
39
|
+
): Promise<Response> {
|
|
40
|
+
const { timeout = 10000, signal: externalSignal, ...fetchOptions } = options
|
|
41
|
+
|
|
42
|
+
const controller = new AbortController()
|
|
43
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout)
|
|
44
|
+
|
|
45
|
+
// If an external signal is provided, listen to it and abort our controller
|
|
46
|
+
if (externalSignal) {
|
|
47
|
+
externalSignal.addEventListener("abort", () => controller.abort())
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
const response = await fetch(url, {
|
|
52
|
+
...fetchOptions,
|
|
53
|
+
signal: controller.signal,
|
|
54
|
+
})
|
|
55
|
+
return response
|
|
56
|
+
} finally {
|
|
57
|
+
clearTimeout(timeoutId)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Fetch JSON with timeout protection
|
|
63
|
+
*
|
|
64
|
+
* Convenience wrapper that automatically parses JSON and handles errors
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const data = await fetchJSON<{ name: string }>('https://api.example.com/user', {
|
|
69
|
+
* timeout: 5000
|
|
70
|
+
* })
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export async function fetchJSON<T = unknown>(
|
|
74
|
+
url: string,
|
|
75
|
+
options: FetchWithTimeoutOptions = {}
|
|
76
|
+
): Promise<T> {
|
|
77
|
+
const response = await fetchWithTimeout(url, options)
|
|
78
|
+
|
|
79
|
+
if (!response.ok) {
|
|
80
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return response.json() as Promise<T>
|
|
84
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module "@/lib/styles/index.css"
|
|
@@ -1,56 +1,58 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type {
|
|
2
|
+
Article,
|
|
3
|
+
BreadcrumbList,
|
|
4
|
+
Organization,
|
|
5
|
+
SearchAction,
|
|
6
|
+
Thing,
|
|
7
|
+
WebPage,
|
|
8
|
+
WebSite,
|
|
9
|
+
WithContext,
|
|
10
|
+
} from "schema-dts"
|
|
11
|
+
|
|
12
|
+
const APP_BASE_URL = process.env.NEXT_PUBLIC_BASE_URL
|
|
8
13
|
|
|
9
14
|
function isAbsoluteUrl(value: string) {
|
|
10
|
-
return /^https?:\/\//.test(value)
|
|
15
|
+
return /^https?:\/\//.test(value)
|
|
11
16
|
}
|
|
12
17
|
|
|
13
18
|
function resolveUrl(value?: string) {
|
|
14
|
-
if (!value) return APP_BASE_URL
|
|
15
|
-
if (isAbsoluteUrl(value)) return value
|
|
16
|
-
if (!APP_BASE_URL) return undefined
|
|
19
|
+
if (!value) return APP_BASE_URL
|
|
20
|
+
if (isAbsoluteUrl(value)) return value
|
|
21
|
+
if (!APP_BASE_URL) return undefined
|
|
17
22
|
|
|
18
|
-
return new URL(value, APP_BASE_URL).toString()
|
|
23
|
+
return new URL(value, APP_BASE_URL).toString()
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
/* -------------------------------- Component ------------------------------- */
|
|
22
27
|
|
|
23
|
-
export function JsonLd<T extends
|
|
24
|
-
data,
|
|
25
|
-
}: {
|
|
26
|
-
data: T;
|
|
27
|
-
}) {
|
|
28
|
+
export function JsonLd<T extends Thing>({ data }: { data: WithContext<T> }) {
|
|
28
29
|
return (
|
|
29
30
|
<script
|
|
30
31
|
type="application/ld+json"
|
|
32
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: JSON-LD must be emitted as a raw script payload; `<` is escaped above for XSS protection.
|
|
31
33
|
dangerouslySetInnerHTML={{
|
|
32
34
|
__html: JSON.stringify(data).replace(/</g, "\\u003c"),
|
|
33
35
|
}}
|
|
34
36
|
/>
|
|
35
|
-
)
|
|
37
|
+
)
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
/* -------------------------------- Generators ------------------------------ */
|
|
39
41
|
|
|
40
42
|
interface WebSiteJsonLdOptions {
|
|
41
|
-
name: string
|
|
42
|
-
url?: string
|
|
43
|
-
description?: string
|
|
43
|
+
name: string
|
|
44
|
+
url?: string
|
|
45
|
+
description?: string
|
|
44
46
|
/** URL to site-wide search (e.g. "/search?q={search_term_string}") */
|
|
45
|
-
searchUrl?: string
|
|
47
|
+
searchUrl?: string
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
export function generateWebSiteJsonLd(
|
|
49
51
|
options: WebSiteJsonLdOptions
|
|
50
|
-
):
|
|
51
|
-
const { name, url, description, searchUrl } = options
|
|
52
|
-
const resolvedUrl = resolveUrl(url)
|
|
53
|
-
const resolvedSearchUrl = resolveUrl(searchUrl)
|
|
52
|
+
): WithContext<WebSite> {
|
|
53
|
+
const { name, url, description, searchUrl } = options
|
|
54
|
+
const resolvedUrl = resolveUrl(url)
|
|
55
|
+
const resolvedSearchUrl = resolveUrl(searchUrl)
|
|
54
56
|
|
|
55
57
|
return {
|
|
56
58
|
"@context": "https://schema.org",
|
|
@@ -63,25 +65,25 @@ export function generateWebSiteJsonLd(
|
|
|
63
65
|
"@type": "SearchAction",
|
|
64
66
|
target: resolvedSearchUrl,
|
|
65
67
|
"query-input": "required name=search_term_string",
|
|
66
|
-
},
|
|
68
|
+
} as SearchAction & { "query-input": string },
|
|
67
69
|
}),
|
|
68
|
-
}
|
|
70
|
+
}
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
interface OrganizationJsonLdOptions {
|
|
72
|
-
name: string
|
|
73
|
-
url?: string
|
|
74
|
-
logo?: string
|
|
75
|
-
description?: string
|
|
76
|
-
sameAs?: string[]
|
|
74
|
+
name: string
|
|
75
|
+
url?: string
|
|
76
|
+
logo?: string
|
|
77
|
+
description?: string
|
|
78
|
+
sameAs?: string[]
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
export function generateOrganizationJsonLd(
|
|
80
82
|
options: OrganizationJsonLdOptions
|
|
81
|
-
):
|
|
82
|
-
const { name, url, logo, description, sameAs } = options
|
|
83
|
-
const resolvedUrl = resolveUrl(url)
|
|
84
|
-
const resolvedLogo = resolveUrl(logo)
|
|
83
|
+
): WithContext<Organization> {
|
|
84
|
+
const { name, url, logo, description, sameAs } = options
|
|
85
|
+
const resolvedUrl = resolveUrl(url)
|
|
86
|
+
const resolvedLogo = resolveUrl(logo)
|
|
85
87
|
|
|
86
88
|
return {
|
|
87
89
|
"@context": "https://schema.org",
|
|
@@ -91,25 +93,25 @@ export function generateOrganizationJsonLd(
|
|
|
91
93
|
...(resolvedLogo && { logo: resolvedLogo }),
|
|
92
94
|
...(description && { description }),
|
|
93
95
|
...(sameAs && { sameAs }),
|
|
94
|
-
}
|
|
96
|
+
}
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
interface WebPageJsonLdOptions {
|
|
98
|
-
title: string
|
|
99
|
-
url?: string
|
|
100
|
-
description?: string
|
|
101
|
-
image?: string
|
|
102
|
-
datePublished?: string
|
|
103
|
-
dateModified?: string
|
|
100
|
+
title: string
|
|
101
|
+
url?: string
|
|
102
|
+
description?: string
|
|
103
|
+
image?: string
|
|
104
|
+
datePublished?: string
|
|
105
|
+
dateModified?: string
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
export function generateWebPageJsonLd(
|
|
107
109
|
options: WebPageJsonLdOptions
|
|
108
|
-
):
|
|
110
|
+
): WithContext<WebPage> {
|
|
109
111
|
const { title, url, description, image, datePublished, dateModified } =
|
|
110
|
-
options
|
|
111
|
-
const resolvedUrl = resolveUrl(url)
|
|
112
|
-
const resolvedImage = resolveUrl(image)
|
|
112
|
+
options
|
|
113
|
+
const resolvedUrl = resolveUrl(url)
|
|
114
|
+
const resolvedImage = resolveUrl(image)
|
|
113
115
|
|
|
114
116
|
return {
|
|
115
117
|
"@context": "https://schema.org",
|
|
@@ -120,23 +122,23 @@ export function generateWebPageJsonLd(
|
|
|
120
122
|
...(resolvedImage && { image: resolvedImage }),
|
|
121
123
|
...(datePublished && { datePublished }),
|
|
122
124
|
...(dateModified && { dateModified }),
|
|
123
|
-
}
|
|
125
|
+
}
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
interface ArticleJsonLdOptions {
|
|
127
|
-
title: string
|
|
128
|
-
url?: string
|
|
129
|
-
description?: string
|
|
130
|
-
image?: string
|
|
131
|
-
datePublished?: string
|
|
132
|
-
dateModified?: string
|
|
133
|
-
authorName?: string
|
|
134
|
-
authorUrl?: string
|
|
129
|
+
title: string
|
|
130
|
+
url?: string
|
|
131
|
+
description?: string
|
|
132
|
+
image?: string
|
|
133
|
+
datePublished?: string
|
|
134
|
+
dateModified?: string
|
|
135
|
+
authorName?: string
|
|
136
|
+
authorUrl?: string
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
export function generateArticleJsonLd(
|
|
138
140
|
options: ArticleJsonLdOptions
|
|
139
|
-
):
|
|
141
|
+
): WithContext<Article> {
|
|
140
142
|
const {
|
|
141
143
|
title,
|
|
142
144
|
url,
|
|
@@ -146,9 +148,9 @@ export function generateArticleJsonLd(
|
|
|
146
148
|
dateModified,
|
|
147
149
|
authorName,
|
|
148
150
|
authorUrl,
|
|
149
|
-
} = options
|
|
150
|
-
const resolvedUrl = resolveUrl(url)
|
|
151
|
-
const resolvedImage = resolveUrl(image)
|
|
151
|
+
} = options
|
|
152
|
+
const resolvedUrl = resolveUrl(url)
|
|
153
|
+
const resolvedImage = resolveUrl(image)
|
|
152
154
|
|
|
153
155
|
return {
|
|
154
156
|
"@context": "https://schema.org",
|
|
@@ -166,29 +168,29 @@ export function generateArticleJsonLd(
|
|
|
166
168
|
...(authorUrl && { url: authorUrl }),
|
|
167
169
|
},
|
|
168
170
|
}),
|
|
169
|
-
}
|
|
171
|
+
}
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
interface BreadcrumbItem {
|
|
173
|
-
name: string
|
|
174
|
-
url: string
|
|
175
|
+
name: string
|
|
176
|
+
url: string
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
export function generateBreadcrumbJsonLd(
|
|
178
180
|
items: BreadcrumbItem[]
|
|
179
|
-
):
|
|
181
|
+
): WithContext<BreadcrumbList> {
|
|
180
182
|
return {
|
|
181
183
|
"@context": "https://schema.org",
|
|
182
184
|
"@type": "BreadcrumbList",
|
|
183
185
|
itemListElement: items.map((item, index) => {
|
|
184
|
-
const resolvedItemUrl = resolveUrl(item.url)
|
|
186
|
+
const resolvedItemUrl = resolveUrl(item.url)
|
|
185
187
|
|
|
186
188
|
return {
|
|
187
189
|
"@type": "ListItem",
|
|
188
190
|
position: index + 1,
|
|
189
191
|
name: item.name,
|
|
190
192
|
...(resolvedItemUrl && { item: resolvedItemUrl }),
|
|
191
|
-
}
|
|
193
|
+
}
|
|
192
194
|
}),
|
|
193
|
-
}
|
|
195
|
+
}
|
|
194
196
|
}
|