diff --git a/apps/sanity/package.json b/apps/sanity/package.json index 04b96d6..dcdc05b 100644 --- a/apps/sanity/package.json +++ b/apps/sanity/package.json @@ -12,6 +12,7 @@ "gen:types": "pnpm extract-schema && pnpm sanity typegen generate" }, "dependencies": { + "@focus-reactive/sanity-plugin-cms-kit": "^0.1.0", "@portabletext/react": "^3.1.0", "@sanity/client": "^6.21.1", "@sanity/image-url": "^1.0.2", diff --git a/apps/sanity/sanity.cli.ts b/apps/sanity/sanity.cli.ts index 644b8ff..d5acc40 100644 --- a/apps/sanity/sanity.cli.ts +++ b/apps/sanity/sanity.cli.ts @@ -1,8 +1,10 @@ -import { loadEnvConfig } from "@next/env"; +// import { loadEnvConfig } from "@next/env"; import { defineCliConfig } from "sanity/cli"; -const dev = process.env.NODE_ENV !== "production"; -loadEnvConfig(__dirname, dev, { info: () => null, error: console.error }); +console.log("add logic to load ebv variables"); + +// const dev = process.env.NODE_ENV !== "production"; +// loadEnvConfig(__dirname, dev, { info: () => null, error: console.error }); // @TODO report top-level await bug // Using a dynamic import here as `loadEnvConfig` needs to run before this file is loaded diff --git a/apps/sanity/sanity.config.ts b/apps/sanity/sanity.config.ts index cfd7a8e..b12c255 100644 --- a/apps/sanity/sanity.config.ts +++ b/apps/sanity/sanity.config.ts @@ -1,3 +1,4 @@ +import { CMSKitContentBlocks } from "@focus-reactive/sanity-plugin-cms-kit"; import { visionTool } from "@sanity/vision"; import { pages } from "@tinloof/sanity-studio"; import { defineConfig } from "sanity"; @@ -40,5 +41,6 @@ export default defineConfig({ structureTool(), visionTool({ defaultApiVersion: config.sanity.apiVersion }), simplerColorInput(), + CMSKitContentBlocks({}), ], }); diff --git a/apps/sanity/src/components/Footer/templates/footer.json b/apps/sanity/src/components/Footer/templates/footer.json deleted file mode 100644 index 07ae6eb..0000000 --- a/apps/sanity/src/components/Footer/templates/footer.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_type": "section.footer", - "copywriteText": "Flowbite™. All Rights Reserved.", - "links": [ - { - "href": "https://github.com/focusreactive/cms-kit", - "target": "_self", - "text": "About", - "type": "url", - "variant": "footerNav" - }, - { - "href": "https://github.com/focusreactive/cms-kit", - "target": "_self", - "text": "Premium", - "type": "url", - "variant": "footerNav" - }, - { - "href": "https://github.com/focusreactive/cms-kit", - "target": "_self", - "text": "Campaigns", - "type": "url", - "variant": "footerNav" - }, - { - "href": "https://github.com/focusreactive/cms-kit", - "target": "_self", - "text": "Blog", - "type": "url", - "variant": "footerNav" - }, - { - "href": "https://github.com/focusreactive/cms-kit", - "target": "_self", - "text": "Affiliate Program", - "type": "url", - "variant": "footerNav" - }, - { - "href": "https://github.com/focusreactive/cms-kit", - "target": "_self", - "text": "FAQs", - "type": "url", - "variant": "footerNav" - }, - { - "href": "https://github.com/focusreactive/cms-kit", - "target": "_self", - "text": "Contact", - "type": "url", - "variant": "footerNav" - } - ], - "text": { - "_type": "customRichText", - "alignVariant": "center", - "text": [ - { - "items": [ - { - "image": { - "_type": "customImage", - "aspectRatio": "3/2", - "height": 200, - "image": { - "_type": "image", - "alt": "fr", - "asset": { - "_ref": "image-ee91bcb6817640ca3892a4d97ef14971f25233d6-345x160-png", - "_type": "reference" - } - } - }, - "link": { - "_type": "customLink", - "href": "https://focusreactive.com", - "target": "_blank", - "type": "url", - "variant": "primary" - }, - "type": "logoLink" - } - ], - "theme": "dark", - "variant": "center" - }, - { - "children": [ - { - "marks": [], - "text": "Open-source library of over 400+ web components and interactive elements built for better web." - } - ], - "markDefs": [], - "style": "normal" - } - ] - }, - "theme": "dark" -} diff --git a/apps/sanity/src/components/Footer/templates/index.ts b/apps/sanity/src/components/Footer/templates/index.ts deleted file mode 100644 index b9139b2..0000000 --- a/apps/sanity/src/components/Footer/templates/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { createTemplate } from "@/lib/templateSelectorInput/createTemplate"; - -import footer from "./footer.json"; - -export const footerTemplates = [ - createTemplate({ - json: footer, - title: "Footer with links", - description: "dakwefwef", - category: "footer", - }), -]; diff --git a/apps/sanity/src/components/Header/templates/header.json b/apps/sanity/src/components/Header/templates/header.json deleted file mode 100644 index 0718caa..0000000 --- a/apps/sanity/src/components/Header/templates/header.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_type": "section.header", - "links": [ - { - "_type": "customLink", - "target": "_self", - "text": "Home", - "type": "internal", - "url": { - "_ref": "07a85c5b-8042-4210-ae90-11077c1f47b6", - "_type": "reference" - }, - "variant": "headerNav" - }, - { - "_type": "customLink", - "target": "_self", - "text": "Demo", - "type": "internal", - "url": { - "_ref": "07a85c5b-8042-4210-ae90-11077c1f47b6", - "_type": "reference" - }, - "variant": "headerNav" - }, - { - "_type": "customLink", - "href": "/studio", - "target": "_self", - "text": "Sanity Studio", - "type": "url", - "url": { - "_ref": "07a85c5b-8042-4210-ae90-11077c1f47b6", - "_type": "reference" - }, - "variant": "headerNav" - }, - { - "_type": "customLink", - "href": "https://github.com/focusreactive/cms-kit-sanity/wiki/init_system", - "target": "_self", - "text": "Docs", - "type": "url", - "variant": "headerNav" - }, - { - "_type": "customLink", - "href": "https://github.com/focusreactive/cms-kit-sanity/wiki/init_system", - "target": "_self", - "text": "Github", - "type": "url", - "variant": "headerNav" - }, - { - "_type": "customLink", - "href": "https://github.com/focusreactive/cms-kit-sanity/wiki/init_system", - "target": "_self", - "text": "About", - "type": "url", - "variant": "headerNav" - } - ], - "theme": "light" -} diff --git a/apps/sanity/src/components/Header/templates/index.ts b/apps/sanity/src/components/Header/templates/index.ts deleted file mode 100644 index ed8bf11..0000000 --- a/apps/sanity/src/components/Header/templates/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { createTemplate } from "@/lib/templateSelectorInput/createTemplate"; - -import header from "./header.json"; - -export const headerTemplates = [ - createTemplate({ - json: header, - title: "Header with links", - description: "dakwefwef", - category: "header", - }), -]; diff --git a/apps/sanity/src/components/Page/schema.ts b/apps/sanity/src/components/Page/schema.ts index 79485b7..34d64ff 100644 --- a/apps/sanity/src/components/Page/schema.ts +++ b/apps/sanity/src/components/Page/schema.ts @@ -3,14 +3,13 @@ import { commonGroups, themeField, } from "@/contentSections/commonFields"; -// import { sectionsPresets } from "@/contentSections/presets"; +import { sectionsPresets } from "@/contentSections/presets"; +import { defineBlocksField } from "@focus-reactive/sanity-plugin-cms-kit"; import { definePathname } from "@tinloof/sanity-studio"; import { defineField, defineType, type FieldGroupDefinition } from "sanity"; import sections from "@/lib/schemas/sections"; -// import { componentsWithBlocksInput } from "@/lib/templateSelectorInput"; - export default defineType({ type: "document", name: "page", @@ -36,17 +35,17 @@ export default defineType({ group: CommonGroup.Content, validation: (Rule) => Rule.required(), }), - defineField({ + defineBlocksField({ name: "sectionsBody", - title: "Sections", - type: "array", - group: CommonGroup.Content, + // add fields to the package + // title: "Sections", + // group: CommonGroup.Content, of: sections.map((section) => ({ type: section.name, })), - // components: componentsWithBlocksInput({ - // presets: Object.values(sectionsPresets).flat(), - // }), + options: { + presets: Object.values(sectionsPresets).flat(), + }, }), defineField({ name: "footer", diff --git a/apps/sanity/src/contentSections/Blog/templates/index.ts b/apps/sanity/src/contentSections/Blog/templates/index.ts index dbe9656..0991950 100644 --- a/apps/sanity/src/contentSections/Blog/templates/index.ts +++ b/apps/sanity/src/contentSections/Blog/templates/index.ts @@ -1,19 +1,19 @@ -import { createTemplate } from "@/lib/templateSelectorInput/createTemplate"; +import type { Preset } from "@focus-reactive/sanity-plugin-cms-kit"; -import withImage from "./with-images.json"; -import withoutImage from "./without-images.json"; +// import { createTemplate } from "@/lib/utils"; -export const blogTemplates = [ - createTemplate({ - json: withImage, - title: "Blog section with images", - description: "desc1", - category: "blog", - }), - createTemplate({ - json: withoutImage, - title: "Blog section without images", - description: "desc2", - category: "blog", - }), +// import withImage from "./with-images.json"; +// import withoutImage from "./without-images.json"; + +export const blogTemplates: Preset[] = [ + // createTemplate({ + // title: "Blog section with images", + // json: withImage, + // category: "blog", + // }), + // createTemplate({ + // title: "Blog section without images", + // json: withoutImage, + // category: "blog", + // }), ]; diff --git a/apps/sanity/src/contentSections/CardsGrid/templates/default-preview.png b/apps/sanity/src/contentSections/CardsGrid/templates/default-preview.png new file mode 100644 index 0000000..2106964 Binary files /dev/null and b/apps/sanity/src/contentSections/CardsGrid/templates/default-preview.png differ diff --git a/apps/sanity/src/contentSections/CardsGrid/templates/default.json b/apps/sanity/src/contentSections/CardsGrid/templates/default.json new file mode 100644 index 0000000..a7326ad --- /dev/null +++ b/apps/sanity/src/contentSections/CardsGrid/templates/default.json @@ -0,0 +1,98 @@ +{ + "marginBottom": "base", + "_key": "bb086e238e49", + "items": [ + { + "image": { + "height": 50, + "image": { + "_type": "image", + "alt": "icon", + "asset": { + "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", + "_type": "reference" + } + }, + "_type": "customImage", + "aspectRatio": "1/1​​​​‌" + }, + "_type": "defaultCard", + "link": { + "target": "_self​​​​‌", + "size": "base", + "_type": "customLink", + "url": null, + "variant": "default", + "text": "link text", + "type": "internal" + }, + "description": "Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.", + "style": "icon-title-inline", + "_key": "27dfd9f9f0e7", + "title": "initial title" + }, + { + "description": "Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.", + "style": "icon-title-inline", + "_key": "b40f414ea8fa644e894e76394547344f", + "title": "initial title​​​​‌", + "image": { + "image": { + "asset": { + "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", + "_type": "reference" + }, + "_type": "image", + "alt": "icon" + }, + "_type": "customImage", + "aspectRatio": "1/1", + "height": 50 + }, + "_type": "defaultCard", + "link": { + "variant": "default", + "text": "link text​​​​‌", + "type": "internal", + "target": "_self​​​​‌", + "url": null, + "size": "base​​​​‌", + "_type": "customLink" + } + }, + { + "link": { + "_type": "customLink", + "variant": "default", + "text": "link text​​​​‌‌", + "type": "internal", + "target": "_self​​​​‌‌", + "url": null, + "size": "base​​​​‌‌" + }, + "description": "Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups‌", + "style": "icon-title-inline", + "_key": "4bb5da5b8b099082b60f068741dce0d0", + "title": "initial title‌", + "image": { + "_type": "customImage", + "aspectRatio": "1/1​​​​‌‌", + "height": 50, + "image": { + "_type": "image", + "alt": "icon‌", + "asset": { + "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", + "_type": "reference" + } + } + }, + "_type": "defaultCard" + } + ], + "marginTop": "base‌", + "maxWidth": "base‌", + "backgroundColor": "none​​​​‌‌", + "columns": 3, + "_type": "section.cardsGrid" +} diff --git a/apps/sanity/src/contentSections/CardsGrid/templates/index.ts b/apps/sanity/src/contentSections/CardsGrid/templates/index.ts index c7d3207..7d023a6 100644 --- a/apps/sanity/src/contentSections/CardsGrid/templates/index.ts +++ b/apps/sanity/src/contentSections/CardsGrid/templates/index.ts @@ -1,12 +1,15 @@ -import { createTemplate } from "@/lib/templateSelectorInput/createTemplate"; +import type { Preset } from "@focus-reactive/sanity-plugin-cms-kit"; -import oneColumns from "./one-column.json"; +import { createTemplate } from "@/lib/utils"; -export const cardsGridsTemplates = [ +import defaultPreview from "./default-preview.png"; +import defaultTemplate from "./default.json"; + +export const cardsGridsTemplates: Preset[] = [ createTemplate({ - json: oneColumns, - title: "One column cards grid", - description: "one columns grid ", - category: "grid", + title: "Three columns cards grid", + json: defaultTemplate, + category: "cardsGrids", + screenshot: defaultPreview.src, }), ]; diff --git a/apps/sanity/src/contentSections/CardsGrid/templates/one-column.json b/apps/sanity/src/contentSections/CardsGrid/templates/one-column.json deleted file mode 100644 index c56433e..0000000 --- a/apps/sanity/src/contentSections/CardsGrid/templates/one-column.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_type": "section.cardsGrid", - "columns": 2, - "items": [ - { - "_type": "defaultCard", - "description": "Deploy faster‍‌", - "image": { - "_type": "customImage", - "aspectRatio": "1/1", - "height": 15, - "image": { - "_type": "image", - "alt": "wd", - "asset": { - "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", - "_type": "reference" - } - } - }, - "style": "icon-title-inline", - "title": "Push to deploy" - }, - { - "_type": "defaultCard", - "description": "Deploy faster‍‌‍ Everything you need to deploy your app Quis tellus eget adipiscing convallis sit sit eget aliquet quis. Suspendisse eget egestas a elementum pulvinar et feugiat blandit at. In mi viverra elit nunc.‍‌‍", - "image": { - "_type": "customImage", - "aspectRatio": "1/1", - "height": 15, - "image": { - "_type": "image", - "alt": "wd", - "asset": { - "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", - "_type": "reference" - } - } - }, - "style": "icon-title-inline", - "title": "Push to deploy" - }, - { - "_type": "defaultCard", - "description": "Deploy faster‍‌‍. Everything you need to deploy your app Quis tellus eget adipiscing convallis sit sit eget aliquet quis. Suspendisse eget egestas a elementum pulvinar et feugiat blandit at. In mi viverra elit nunc.‍‌‍", - "image": { - "_type": "customImage", - "aspectRatio": "1/1", - "height": 15, - "image": { - "_type": "image", - "alt": "wd", - "asset": { - "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", - "_type": "reference" - } - } - }, - "style": "icon-title-inline", - "title": "Push to deploy" - }, - { - "_type": "defaultCard", - "description": "Deploy faster‍‌‍ Everything you need to deploy your app‍‌‍ Quis tellus eget adipiscing convallis sit sit eget aliquet quis. Suspendisse eget egestas a elementum pulvinar et feugiat blandit at. In mi viverra elit nunc.", - "image": { - "_type": "customImage", - "aspectRatio": "1/1", - "height": 15, - "image": { - "_type": "image", - "alt": "wd", - "asset": { - "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", - "_type": "reference" - } - } - }, - "style": "icon-title-inline", - "title": "Push to deploy" - } - ], - "theme": "light" -} diff --git a/apps/sanity/src/contentSections/Copy/templates/default-preview.png b/apps/sanity/src/contentSections/Copy/templates/default-preview.png new file mode 100644 index 0000000..f8ccad3 Binary files /dev/null and b/apps/sanity/src/contentSections/Copy/templates/default-preview.png differ diff --git a/apps/sanity/src/contentSections/Copy/templates/default.json b/apps/sanity/src/contentSections/Copy/templates/default.json new file mode 100644 index 0000000..9bc6b92 --- /dev/null +++ b/apps/sanity/src/contentSections/Copy/templates/default.json @@ -0,0 +1,81 @@ +{ + "marginBottom": "base​​​​‌", + "_key": "54c4351ff481", + "isReversedOnMobile": false, + "marginTop": "base​​​​‌", + "maxWidth": "base​​​​‌", + "backgroundColor": "none", + "columns": [ + { + "_key": "55ba7409e7fb", + "removeInnerMargins": false, + "_type": "customRichText", + "alignVariant": "left", + "text": [ + { + "children": [ + { + "_type": "span", + "marks": [], + "text": "title", + "_key": "036d8a93fa5d" + } + ], + "_type": "block", + "style": "h2", + "_key": "88ee66df51fa", + "markDefs": [] + }, + { + "_type": "block", + "style": "normal", + "_key": "f3948c81e5c7", + "markDefs": [], + "children": [ + { + "_key": "b327250337940", + "_type": "span", + "marks": ["strong", "em"], + "text": "Lorem ipsum" + }, + { + "_type": "span", + "marks": ["strong"], + "text": " is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.​​​​‌", + "_key": "b327250337941" + } + ] + }, + { + "_type": "block", + "style": "normal", + "_key": "a39782f3110a", + "markDefs": [], + "children": [ + { + "_type": "span", + "marks": [], + "text": "", + "_key": "81df362565120" + } + ] + }, + { + "children": [ + { + "_type": "span", + "marks": ["underline"], + "text": "Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.​​​​‌", + "_key": "92873e08cb300" + } + ], + "_type": "block", + "style": "normal", + "_key": "491288596ec9", + "markDefs": [] + } + ] + } + ], + "_type": "section.copy" +} diff --git a/apps/sanity/src/contentSections/Copy/templates/image-cards-grid.json b/apps/sanity/src/contentSections/Copy/templates/image-cards-grid.json deleted file mode 100644 index 995bf99..0000000 --- a/apps/sanity/src/contentSections/Copy/templates/image-cards-grid.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "_type": "section.copy", - "columns": [ - { - "_type": "customRichText", - "alignVariant": "center", - "removeInnerMargins": false, - "text": [ - { - "_type": "block", - "children": [ - { - "_type": "span", - "marks": ["strong"], - "text": "Deploy faster" - } - ], - "markDefs": [], - "style": "normal" - }, - { - "_type": "block", - "children": [ - { - "_type": "span", - "marks": [], - "text": "A better workflow" - } - ], - "markDefs": [], - "style": "h2" - }, - { - "_type": "block", - "children": [ - { - "_type": "span", - "marks": [], - "text": "Lorem ipsum, dolor sit amet consectetur adipisicing elit. Maiores impedit perferendis suscipit eaque, iste dolor cupiditate blanditiis ratione." - } - ], - "markDefs": [], - "style": "normal" - }, - { - "_type": "section.cardsGrid", - "columns": 2, - "items": [ - { - "_type": "defaultCard", - "description": "Given the task of adding specific import statements to existing files, both Plop and Hygen can handle this requirement effectively. Let's look at how each solution can address this need.‌", - "image": { - "_type": "customImage", - "aspectRatio": "1/1", - "height": 20, - "image": { - "_type": "image", - "alt": "12", - "asset": { - "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", - "_type": "reference" - } - } - }, - "style": "icon-left-with-background", - "title": "Feature example" - }, - { - "_type": "defaultCard", - "description": "​​​‌Given the task of adding specific import statements to existing files, both Plop and Hygen can handle this requirement effectively. Let's look at how each solution can address this need.‌", - "image": { - "_type": "customImage", - "aspectRatio": "1/1", - "height": 20, - "image": { - "_type": "image", - "alt": "12", - "asset": { - "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", - "_type": "reference" - } - } - }, - "style": "icon-left-with-background", - "title": "Feature example" - }, - { - "_type": "defaultCard", - "description": "Given the task of adding specific import statements to existing files, both Plop and Hygen can handle this requirement effectively. Let's look at how each solution can address this need.‌", - "image": { - "_type": "customImage", - "aspectRatio": "1/1", - "height": 20, - "image": { - "_type": "image", - "alt": "12", - "asset": { - "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", - "_type": "reference" - } - } - }, - "style": "icon-left-with-background", - "title": "Feature example" - }, - { - "_type": "defaultCard", - "description": "Given the task of adding specific import statements to existing files, both Plop and Hygen can handle this requirement effectively. Let's look at how each solution can address this need.‌", - "image": { - "_type": "customImage", - "aspectRatio": "1/1", - "height": 20, - "image": { - "_type": "image", - "alt": "12", - "asset": { - "_ref": "image-e41ba355dad1252ec04515b9f6a0195b31c9fbee-24x24-webp", - "_type": "reference" - } - } - }, - "style": "icon-left-with-background", - "title": "Feature example" - } - ], - "theme": "dark" - } - ] - }, - { - "_type": "customRichText", - "text": [ - { - "_type": "customImage", - "aspectRatio": "16/9", - "height": 500, - "image": { - "_type": "image", - "asset": { - "_ref": "image-3999b2b44708123af956203154160e652a3c88d5-1792x1008-webp", - "_type": "reference" - } - } - } - ] - } - ], - "isReversedOnMobile": true, - "theme": "dark" -} diff --git a/apps/sanity/src/contentSections/Copy/templates/index.ts b/apps/sanity/src/contentSections/Copy/templates/index.ts index 094ae8e..322834e 100644 --- a/apps/sanity/src/contentSections/Copy/templates/index.ts +++ b/apps/sanity/src/contentSections/Copy/templates/index.ts @@ -1,12 +1,15 @@ -import { createTemplate } from "@/lib/templateSelectorInput/createTemplate"; +import type { Preset } from "@focus-reactive/sanity-plugin-cms-kit"; -import centeredDark from "./image-cards-grid.json"; +import { createTemplate } from "@/lib/utils"; -export const copyTemplates = [ +import defaultPreview from "./default-preview.png"; +import defaultTemplate from "./default.json"; + +export const copyTemplates: Preset[] = [ createTemplate({ - json: centeredDark, title: "Text, cards grid and an image", - description: "dak", + json: defaultTemplate, category: "copy", + screenshot: defaultPreview.src, }), ]; diff --git a/apps/sanity/src/contentSections/Hero/templates/default-preview.png b/apps/sanity/src/contentSections/Hero/templates/default-preview.png new file mode 100644 index 0000000..44478fc Binary files /dev/null and b/apps/sanity/src/contentSections/Hero/templates/default-preview.png differ diff --git a/apps/sanity/src/contentSections/Hero/templates/default.json b/apps/sanity/src/contentSections/Hero/templates/default.json new file mode 100644 index 0000000..91947ad --- /dev/null +++ b/apps/sanity/src/contentSections/Hero/templates/default.json @@ -0,0 +1,80 @@ +{ + "_key": "cc234d717c1a", + "maxWidth": "base", + "marginTop": "base", + "_type": "section.hero", + "backgroundColor": "none", + "links": [ + { + "target": "_blank", + "size": "base", + "_type": "customLink", + "variant": "primary", + "href": "https://github.com/focusreactive/cms-kit", + "text": "Get for free", + "_key": "f040752769eb", + "type": "url" + }, + { + "type": "url", + "target": "_blank", + "size": "base", + "_type": "customLink", + "variant": "secondary", + "href": "https://focusreactive.com/#mail-us", + "text": "Request a demo", + "_key": "2e6d45a8ffb90a9d2f617459b0058096" + } + ], + "marginBottom": "base", + "text": { + "removeInnerMargins": true, + "_type": "customRichText", + "alignVariant": "left", + "text": [ + { + "_key": "803b91475d98", + "markDefs": [], + "children": [ + { + "_type": "span", + "marks": [], + "text": "In Notion, work feels better.", + "_key": "5d2397ebf0b70" + } + ], + "_type": "block", + "style": "h2" + }, + { + "markDefs": [], + "children": [ + { + "text": "With a little help from AI.", + "_key": "37bb7278b2010", + "_type": "span", + "marks": [] + } + ], + "_type": "block", + "style": "h2", + "_key": "349ddd94fa19" + } + ] + }, + "image": { + "aspectRatio": "16/9", + "height": 398, + "image": { + "alt": "hero image", + "asset": { + "_ref": "image-87bbe62c05af83adf65157b910fb734a6eca8cea-1920x1023-png", + "_type": "reference" + }, + "_type": "image" + }, + "_type": "customImage" + }, + "title": "cms-kit", + "globalData": null +} diff --git a/apps/sanity/src/contentSections/Hero/templates/index.ts b/apps/sanity/src/contentSections/Hero/templates/index.ts new file mode 100644 index 0000000..e536af6 --- /dev/null +++ b/apps/sanity/src/contentSections/Hero/templates/index.ts @@ -0,0 +1,15 @@ +import type { Preset } from "@focus-reactive/sanity-plugin-cms-kit"; + +import { createTemplate } from "@/lib/utils"; + +import defaultPreview from "./default-preview.png"; +import defaultTemplate from "./default.json"; + +export const heroTemplates: Preset[] = [ + createTemplate({ + title: "Hero default", + json: defaultTemplate, + category: "hero", + screenshot: defaultPreview.src, + }), +]; diff --git a/apps/sanity/src/contentSections/LinksList/templates/badge.json b/apps/sanity/src/contentSections/LinksList/templates/badge.json deleted file mode 100644 index 3a2b803..0000000 --- a/apps/sanity/src/contentSections/LinksList/templates/badge.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "_type": "section.linksList", - "alignVariant": "center", - "links": [ - { - "_type": "customLink", - "target": "_self", - "text": "Demo & Initial Project Read More →​​​​‌", - "type": "internal", - "url": { - "_ref": "0a28744d-602b-49a3-b91a-17a56e3c7832", - "_type": "reference" - }, - "variant": "badge" - } - ], - "theme": "dark" -} diff --git a/apps/sanity/src/contentSections/LinksList/templates/default-preview.png b/apps/sanity/src/contentSections/LinksList/templates/default-preview.png new file mode 100644 index 0000000..f4d6a06 Binary files /dev/null and b/apps/sanity/src/contentSections/LinksList/templates/default-preview.png differ diff --git a/apps/sanity/src/contentSections/LinksList/templates/default.json b/apps/sanity/src/contentSections/LinksList/templates/default.json new file mode 100644 index 0000000..c95de65 --- /dev/null +++ b/apps/sanity/src/contentSections/LinksList/templates/default.json @@ -0,0 +1,31 @@ +{ + "alignVariant": "left", + "links": [ + { + "target": "_blank", + "size": "base​​​", + "_type": "customLink", + "variant": "primary", + "href": "https://google.com", + "text": "Get for free", + "_key": "2739e01fde20ada6117123343086ed46", + "type": "url" + }, + { + "size": "base", + "_type": "customLink", + "variant": "secondary", + "href": "https://google.com", + "text": "Get for free", + "_key": "5833c115c14e9b8bc513e387d43b3551", + "type": "url", + "target": "_blank​​​​" + } + ], + "marginBottom": "base​​", + "_key": "29ba8638c4e8", + "marginTop": "base​​​​‌", + "maxWidth": "base​​​​‌", + "backgroundColor": "none", + "_type": "section.linksList" +} diff --git a/apps/sanity/src/contentSections/LinksList/templates/index.ts b/apps/sanity/src/contentSections/LinksList/templates/index.ts index 6537697..5f68ac6 100644 --- a/apps/sanity/src/contentSections/LinksList/templates/index.ts +++ b/apps/sanity/src/contentSections/LinksList/templates/index.ts @@ -1,19 +1,15 @@ -import { createTemplate } from "@/lib/templateSelectorInput/createTemplate"; +import type { Preset } from "@focus-reactive/sanity-plugin-cms-kit"; -import badge from "./badge.json"; -import primarySecondary from "./primary-secondary.json"; +import { createTemplate } from "@/lib/utils"; -export const linksListTemplates = [ - createTemplate({ - json: badge, - title: "Badge link style", - description: "wdwefewfwefwef", - category: "linksList", - }), +import defaultPreview from "./default-preview.png"; +import defaultTemplate from "./default.json"; + +export const linksListTemplates: Preset[] = [ createTemplate({ - json: primarySecondary, - title: "Primary and secondary links list", - description: "wdwefewf121212wefwef", + title: "Two links list", + json: defaultTemplate, category: "linksList", + screenshot: defaultPreview.src, }), ]; diff --git a/apps/sanity/src/contentSections/LinksList/templates/primary-secondary.json b/apps/sanity/src/contentSections/LinksList/templates/primary-secondary.json deleted file mode 100644 index d7a2158..0000000 --- a/apps/sanity/src/contentSections/LinksList/templates/primary-secondary.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "_type": "section.linksList", - "alignVariant": "center", - "links": [ - { - "_type": "customLink", - "target": "_self", - "text": "Get Started", - "type": "internal", - "url": { - "_ref": "0a28744d-602b-49a3-b91a-17a56e3c7832", - "_type": "reference" - }, - "variant": "primary" - }, - { - "_type": "customLink", - "target": "_self", - "text": "Try Now", - "type": "internal", - "url": { - "_ref": "0a28744d-602b-49a3-b91a-17a56e3c7832", - "_type": "reference" - }, - "variant": "secondary" - } - ], - "theme": "dark" -} diff --git a/apps/sanity/src/contentSections/Logos/templates/default-preview.png b/apps/sanity/src/contentSections/Logos/templates/default-preview.png new file mode 100644 index 0000000..9732e4e Binary files /dev/null and b/apps/sanity/src/contentSections/Logos/templates/default-preview.png differ diff --git a/apps/sanity/src/contentSections/Logos/templates/logos.json b/apps/sanity/src/contentSections/Logos/templates/default.json similarity index 51% rename from apps/sanity/src/contentSections/Logos/templates/logos.json rename to apps/sanity/src/contentSections/Logos/templates/default.json index cff21a9..ea95f92 100644 --- a/apps/sanity/src/contentSections/Logos/templates/logos.json +++ b/apps/sanity/src/contentSections/Logos/templates/default.json @@ -1,122 +1,146 @@ { + "maxWidth": "base​​​​‌‌", + "backgroundColor": "none‍", "_type": "section.logos", + "alignVariant": "center​​​​‌", + "marginBottom": "base​​​​‌", + "_key": "92db570ae9c5", "items": [ { - "_type": "logoItem", + "_key": "48f5d8c30794", + "type": "logo", "image": { - "_type": "customImage", "aspectRatio": "3/1", - "height": 100, + "height": 300, "image": { "_type": "image", "alt": "prismic", "asset": { - "_ref": "image-ea3ba2b076652df8c4cdff0fcbc222e1629398d8-1024x264-webp", - "_type": "reference" + "_type": "reference", + "_ref": "image-ea3ba2b076652df8c4cdff0fcbc222e1629398d8-1024x264-webp" } - } + }, + "_type": "customImage" }, + "_type": "logoItem", "link": { + "size": "base", "_type": "customLink", - "href": "https://github.com/dogfogfog", - "target": "_self", - "type": "url", - "variant": "primary" - }, - "type": "logoLink" + "variant": "default", + "text": "link text", + "type": "internal", + "target": "_self​​", + "url": null + } }, { "_type": "logoItem", + "link": { + "text": "link text", + "type": "internal", + "target": "_self​", + "size": "base​​​", + "_type": "customLink", + "variant": "default", + "url": null + }, + "_key": "09a3481afc801a6b1c7ba37c72d075f4", + "type": "logo", "image": { "_type": "customImage", - "aspectRatio": "4/1", + "aspectRatio": "3/1", "height": 300, "image": { - "_type": "image", - "alt": "gats", "asset": { "_ref": "image-ffa01b3e6b32fa47128b34c38d90363f9fdcbe21-2500x538-webp", "_type": "reference" - } + }, + "_type": "image", + "alt": "storyblok" } - }, - "link": { - "_type": "customLink", - "target": "_self", - "type": "internal", - "variant": "primary" - }, - "type": "logo" + } }, { - "_type": "logoItem", + "type": "logo", "image": { "_type": "customImage", "aspectRatio": "3/1", - "height": 200, + "height": 300, "image": { - "_type": "image", - "alt": "hygraph", "asset": { - "_ref": "image-6e6cc1187326add2d8ddc718895981e3376338cc-716x200-webp", - "_type": "reference" - } + "_type": "reference", + "_ref": "image-6e6cc1187326add2d8ddc718895981e3376338cc-716x200-webp" + }, + "_type": "image", + "alt": "hygraph​​​​‌" } }, + "_type": "logoItem", "link": { - "_type": "customLink", - "target": "_self", + "text": "link text​​​​", + "url": null, "type": "internal", - "variant": "primary" + "target": "_self​​​​‌", + "size": "base​​​​‌", + "_type": "customLink", + "variant": "default" }, - "type": "logo" + "_key": "2d441c5f50af821299e3c4d177b0bcb1" }, { "_type": "logoItem", + "link": { + "size": "base​​​​‌", + "_type": "customLink", + "url": null, + "variant": "default", + "text": "link text", + "type": "internal", + "target": "_self​​" + }, + "_key": "7cf2eb61d1ccb04c545eda2a7d8dfebd", + "type": "logo", "image": { "_type": "customImage", "aspectRatio": "3/1", - "height": 200, + "height": 300, "image": { "_type": "image", - "alt": "hygraph", + "alt": "ghost​​", "asset": { "_ref": "image-14480f7e6cffd126f29ca432552f310e8b01559c-800x294-webp", "_type": "reference" } } - }, - "link": { - "_type": "customLink", - "target": "_self", - "type": "internal", - "variant": "primary" - }, - "type": "logo" + } }, { - "_type": "logoItem", + "_key": "782a25eb852075058097ec214d1a2b8c", + "type": "logo", "image": { - "_type": "customImage", - "aspectRatio": "3/1", - "height": 200, "image": { "_type": "image", - "alt": "gats", + "alt": "gatsby​", "asset": { "_ref": "image-d356e78adf7bb1d8b313aedd75de21701a915eeb-2000x555-webp", "_type": "reference" } - } + }, + "_type": "customImage", + "aspectRatio": "3/1", + "height": 300 }, + "_type": "logoItem", "link": { + "target": "_self​​​", + "size": "base​​​​‌", + "url": null, "_type": "customLink", - "target": "_self", - "type": "internal", - "variant": "primary" - }, - "type": "logo" + "variant": "default", + "text": "link text", + "type": "internal" + } } ], - "variant": "center" + "marginTop": "base​​​​‌" } diff --git a/apps/sanity/src/contentSections/Logos/templates/index.ts b/apps/sanity/src/contentSections/Logos/templates/index.ts index d9bfe1e..3165056 100644 --- a/apps/sanity/src/contentSections/Logos/templates/index.ts +++ b/apps/sanity/src/contentSections/Logos/templates/index.ts @@ -1,12 +1,15 @@ -import { createTemplate } from "@/lib/templateSelectorInput/createTemplate"; +import type { Preset } from "@focus-reactive/sanity-plugin-cms-kit"; -import logos from "./logos.json"; +import { createTemplate } from "@/lib/utils"; -export const logosTemplates = [ +import defaultPreview from "./default-preview.png"; +import defaultTemplate from "./default.json"; + +export const logosTemplates: Preset[] = [ createTemplate({ - json: logos, - title: "Logos list", - description: "wdwefewfwefwef", + title: "1212121212 Logos default", + json: defaultTemplate, category: "logos", + screenshot: defaultPreview.src, }), ]; diff --git a/apps/sanity/src/contentSections/presets.ts b/apps/sanity/src/contentSections/presets.ts index e7fe3f2..6055c39 100644 --- a/apps/sanity/src/contentSections/presets.ts +++ b/apps/sanity/src/contentSections/presets.ts @@ -1,13 +1,15 @@ import { blogTemplates } from "./Blog/templates"; import { cardsGridsTemplates } from "./CardsGrid/templates"; import { copyTemplates } from "./Copy/templates"; +import { heroTemplates } from "./Hero/templates"; import { linksListTemplates } from "./LinksList/templates"; import { logosTemplates } from "./Logos/templates"; export const sectionsPresets = { + logos: logosTemplates, blog: blogTemplates, cardsGrids: cardsGridsTemplates, copy: copyTemplates, linksList: linksListTemplates, - logos: logosTemplates, + hero: heroTemplates, }; diff --git a/apps/sanity/src/lib/schemas/customRichText.tsx b/apps/sanity/src/lib/schemas/customRichText.tsx index 6af3b04..58481b0 100644 --- a/apps/sanity/src/lib/schemas/customRichText.tsx +++ b/apps/sanity/src/lib/schemas/customRichText.tsx @@ -1,10 +1,8 @@ import { CommonGroup, commonGroups } from "@/contentSections/commonFields"; -import { sectionsPresets } from "@/contentSections/presets"; +// import { sectionsPresets } from "@/contentSections/presets"; import { AlignVariant } from "@shared/ui/components/ui/richText/types"; import { defineField, defineType } from "sanity"; -import { componentsWithBlocksInput } from "@/lib/templateSelectorInput"; - export const richTextBreak = defineType({ name: "break", type: "object", @@ -69,18 +67,18 @@ const customRichText = defineType({ type: "section.linksList", }, ], - components: componentsWithBlocksInput({ - presets: Object.values(sectionsPresets) - .flat() - .filter((v) => - [ - "section.logos", - "section.cardsGrid", - "section.linksList", - ].includes(v.value._type), - ), - isRichText: true, - }), + // components: componentsWithBlocksInput({ + // presets: Object.values(sectionsPresets) + // .flat() + // .filter((v) => + // [ + // "section.logos", + // "section.cardsGrid", + // "section.linksList", + // ].includes(v.value._type), + // ), + // isRichText: true, + // }), }), defineField({ diff --git a/apps/sanity/src/lib/templateSelectorInput/BlocksBrowser.tsx b/apps/sanity/src/lib/templateSelectorInput/BlocksBrowser.tsx deleted file mode 100644 index a6907a1..0000000 --- a/apps/sanity/src/lib/templateSelectorInput/BlocksBrowser.tsx +++ /dev/null @@ -1,371 +0,0 @@ -import { useState } from "react"; -import { CloseCircleIcon, SearchIcon } from "@sanity/icons"; -import { Autocomplete, Box, Select, Stack } from "@sanity/ui"; -import styled from "styled-components"; - -import type { - OnItemAppend, - Preset, - RenderItemProps, - RenderItemViewProps, - RenderViewProps, -} from "./types"; - -const DefaultRenderItemView = ({ preset }: RenderItemViewProps) => { - const height = 100 + Math.round(Math.random() * 300); - - return ( -
-

{preset.meta?.title}

-

{preset.name}

-
- ); -}; - -const ItemContainer = styled.div` - font-size: 10px; - overflow: hidden; - background-color: #242424b5; - border-radius: 5px; - min-height: 200px; - display: flex; - flex-direction: column; - justify-content: space-between; -`; - -const ItemActions = styled.div` - display: flex; - justify-content: space-between; - align-items: center; - background-color: #00000026; - padding-top: 6px; - - button.primary { - flex: none; - min-width: 50px; - padding: 4px 12px; - background-color: #1a345a; - align-self: flex-end; - border-radius: 5px; - &:hover { - background-color: #203e6c; - } - } - - .title { - padding: 2px; - cursor: zoom-in; - button { - border: none; - background: none; - text-align: left; - } - &:hover { - background-color: #ffffff1c; - cursor: zoom-in; - } - } -`; - -const DefaultRenderItem = ({ - preset, - onItemAppend, - selectSinglePreset, - renderItemView, -}: RenderItemProps) => { - const handleClick = () => { - onItemAppend(preset.value); - }; - - const handleSelectSingle = () => { - selectSinglePreset(preset); - }; - - return ( - -
{renderItemView({ preset })}
- -
- -
- -
-
- ); -}; - -const ViewContainer = styled.div` - display: flex; - flex-direction: row; - justify-content: stretch; - gap: 16px; -`; - -const PopupInnerContainer = styled.div` - max-height: 40vh; - overflow-y: auto; -`; - -const PopupToolbar = styled.div` - padding: 16px 0; - display: flex; - justify-content: space-between; - gap: 10px; -`; - -const ViewColumnContainer = styled.div` - flex-grow: 1; - flex-shrink: 1; - flex-base: 150px; - display: flex; - flex-direction: column; - justify-content: flex-start; - gap: 8px; - width: 50px; -`; - -const RenderColumn = ({ - presets, - position, - columns, - renderItem, - renderItemView, - onItemAppend, - selectSinglePreset, -}: RenderViewProps & { position: number; columns: number }) => { - const presetsColumns = presets.filter((_, i) => i % columns === position); - return ( - - {presetsColumns.map((preset) => ( -
- {renderItem({ - preset, - onItemAppend, - selectSinglePreset, - renderItemView, - })} -
- ))} -
- ); -}; - -const DefaultRenderView = ({ - presets, - renderItem, - renderItemView, - onItemAppend, - selectSinglePreset, -}: RenderViewProps) => { - const columns = 3; - const rendersArray = new Array(columns).fill(1).map((_, i) => i); - - return ( -
- - - {rendersArray.map((c) => ( - - ))} - - -
- ); -}; - -const CloseButton = styled.button` - width: 30px; - height: 30px; - font-size: 20px; - color: #595959; - position: absolute; - top: 0px; - right: 0px; - cursor: pointer; - - &:hover { - color: #b6b6b6; - } -`; - -type Props = { - onClose: () => void; - onItemAppend: OnItemAppend; - presets: Preset[]; - renderView?: (props: RenderViewProps) => React.ReactNode; - renderItem?: (props: RenderItemProps) => React.ReactNode; - renderItemView?: (props: RenderItemViewProps) => React.ReactNode; -}; - -const BlocksBrowser = ({ - onClose, - onItemAppend, - presets, - renderView = (props) => , - renderItem = (props) => , - renderItemView = (props) => , -}: Props) => { - const [singleViewName, setSingleViewName] = useState(""); - const [filterTitle, setFilterTitle] = useState(""); - const [areaFilter, setAreaFilter] = useState("all"); - const [categoryFilter, setCategoryFilter] = useState("all"); - const [typesFilter, setTypesFilter] = useState("all"); - const [nameFilter, setNameFilter] = useState("all"); - - console.log("presets2"); - console.log(presets); - - const searchOptions = presets.map((p) => ({ value: p.meta?.title })); - const areaOptionsSet = new Set(presets.map((p) => p.meta.area)); - const categoryOptionsSet = new Set(presets.map((p) => p.meta.category)); - const typesOptionsSet = new Set(presets.map((p) => p.value._type)); - const nameOptionsSet = new Set(presets.map((p) => p.name)); - - const handleSearchByName = (value: any) => { - setFilterTitle(value || ""); - }; - - const handleSelect = (setFn: any) => (e: any) => { - const value = e.target.value; - console.log("🚀 ~ handleSelect ~ value:", value); - setFn(value); - }; - - const filteredPresets = presets - .filter((p) => !!p.meta?.title?.match(filterTitle)) - .filter((p) => (areaFilter === "all" ? true : p.meta.area === areaFilter)) - .filter((p) => - categoryFilter === "all" ? true : p.meta.category === categoryFilter, - ) - .filter((p) => - typesFilter === "all" ? true : p.value._type === typesFilter, - ) - .filter((p) => (nameFilter === "all" ? true : p.name === nameFilter)); - - const preset = singleViewName - ? presets.find((p) => p.name === singleViewName) - : undefined; - - const selectSinglePreset = (p?: Preset) => { - if (!p) { - setSingleViewName(""); - } - setSingleViewName(p!.name); - }; - - const resetSinglePreset = () => setSingleViewName(""); - - return ( - - - - - - - { - console.log("option.value, query"); - console.log(option.value, query); - - handleSearchByName(query); - return !!option.value.match(query); - }} - /> - - - - - - - - - - {singleViewName ? ( - - {renderItem({ - onItemAppend, - preset: preset!, - selectSinglePreset: resetSinglePreset, - // @ts-ignore - renderItemView, - })} - - ) : ( - - {renderView({ - presets: filteredPresets, - onItemAppend, - renderItem, - // @ts-ignore - renderItemView, - selectSinglePreset, - })} - - )} - - - ); -}; - -export default BlocksBrowser; diff --git a/apps/sanity/src/lib/templateSelectorInput/BlocksInput.tsx b/apps/sanity/src/lib/templateSelectorInput/BlocksInput.tsx deleted file mode 100644 index 50466fe..0000000 --- a/apps/sanity/src/lib/templateSelectorInput/BlocksInput.tsx +++ /dev/null @@ -1,139 +0,0 @@ -import React, { type ComponentType } from "react"; -import { AddIcon } from "@sanity/icons"; -import { Button, Card, Grid, Popover, Stack, Text } from "@sanity/ui"; -import type { ArrayFieldProps } from "sanity"; -import styled from "styled-components"; -import { v4 as uuid } from "uuid"; - -import BlocksBrowser from "./BlocksBrowser"; -import type { BlocksInputCustomProps } from "./types"; - -const ButtonsContainer = styled.div` - position: relative; - display: flex; - justify-content: stretch; - gap: 16px; - width: 100%; - button { - flex-grow: 1; - } -`; - -type RenderBlocksSelectorProps = { - onClose: () => void; -}; -type ArrayFunctionsProps = { - onPaste: () => void; - renderBlocksSelector: (props: RenderBlocksSelectorProps) => React.ReactNode; -}; - -const ArrayFunctions = ({ - setIsAddOpen, - isAddOpen, - renderBlocksSelector, - // onPaste, -}: ArrayFunctionsProps & any) => { - const handleClose = () => { - setIsAddOpen(!isAddOpen); - }; - return ( - - - - - {isAddOpen && ( - ({})} - onItemAppend={(v) => - props.inputProps.onItemAppend({ ...v, _key: uuid() }) - } - presets={props.presets} - renderItemView={props.renderItemView} - renderItem={props.renderItem} - renderView={props.renderView} - /> - )} - - ) : ( - props.inputProps.renderInput(inputProps) - )} - - ); -}; diff --git a/apps/sanity/src/lib/templateSelectorInput/createTemplate.ts b/apps/sanity/src/lib/templateSelectorInput/createTemplate.ts deleted file mode 100644 index 4b9c10f..0000000 --- a/apps/sanity/src/lib/templateSelectorInput/createTemplate.ts +++ /dev/null @@ -1,27 +0,0 @@ -export function createTemplate({ - json, - title, - description, - category, -}: { - json: any; - title: string; - description: string; - category: string; -}) { - return { - name: title, - value: json, - meta: { - name: json._type, - type: json._type, - namespace: json._type, - title: json._type, - description, - category, - area: json._type, - // template: json, - // height: 500, - }, - }; -} diff --git a/apps/sanity/src/lib/templateSelectorInput/index.tsx b/apps/sanity/src/lib/templateSelectorInput/index.tsx deleted file mode 100644 index 9b5cc19..0000000 --- a/apps/sanity/src/lib/templateSelectorInput/index.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from "react"; - -import { BlocksInput } from "./BlocksInput"; - -export const componentsWithBlocksInput = (params: object) => { - return { - field: (props: any) => , - // input: (props) => ( - // wefwefwefwefwfwf - // ), - }; -}; diff --git a/apps/sanity/src/lib/templateSelectorInput/types.ts b/apps/sanity/src/lib/templateSelectorInput/types.ts deleted file mode 100644 index cdb7155..0000000 --- a/apps/sanity/src/lib/templateSelectorInput/types.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { SchemaTypeDefinition } from "sanity"; - -export type Preset = { - name: string; - value: { - _key: string; - _type: string; - }; - meta: { - area: string; - category: string; - title: string; - }; -}; - -export type OnItemAppend = (item: { _key: string }) => void; - -export type RenderItemViewProps = { - preset: Preset; -}; - -export type RenderItemProps = { - preset: Preset; - onItemAppend: OnItemAppend; - selectSinglePreset: (p?: Preset) => void; - renderItemView: (props: RenderItemViewProps) => React.ReactNode; -}; - -export type RenderViewProps = { - presets: Array; - onItemAppend: OnItemAppend; - renderItem: (props: RenderItemProps) => React.ReactNode; - renderItemView: (props: RenderItemViewProps) => React.ReactNode; - selectSinglePreset: (p?: Preset) => void; -}; - -export type contentBlocksProps = { - blockTypes: SchemaTypeDefinition[]; - name: string; - params: object; - renderItem?: (props: RenderItemProps) => React.ReactNode; - renderItemView?: (props: RenderItemViewProps) => React.ReactNode; - renderView?: (props: RenderViewProps) => React.ReactNode; -}; - -export type ContentBlocksArg = { - sets?: Array; - presets?: Array; - blockTypes?: SchemaTypeDefinition[]; -}; - -export type BlocksInputCustomProps = { - renderItem?: (props: RenderItemProps) => React.ReactNode; - renderItemView?: (props: RenderItemViewProps) => React.ReactNode; - renderView?: (props: RenderViewProps) => React.ReactNode; - presets: Preset[]; -}; diff --git a/apps/sanity/src/lib/utils.ts b/apps/sanity/src/lib/utils.ts index ea130f0..565b8ac 100644 --- a/apps/sanity/src/lib/utils.ts +++ b/apps/sanity/src/lib/utils.ts @@ -1,4 +1,5 @@ import type { Page } from "@/generated/extracted-types"; +import type { Preset } from "@focus-reactive/sanity-plugin-cms-kit"; import createImageUrlBuilder from "@sanity/image-url"; import config from "../config"; @@ -20,3 +21,27 @@ export const urlForImage = (source: Page["ogImage"]) => { export function urlForOpenGraphImage(image: Page["ogImage"]) { return urlForImage(image)?.width(1200).height(627).fit("crop").url(); } + +// should be moved to the package and imported from there +export function createTemplate({ + json, + title, + category, + screenshot, +}: { + json: any; + title: string; + category: string; + screenshot: string; +}): Preset { + return { + name: title, + value: json, + meta: { + area: json._type, + category, + title, + screenshot, + }, + }; +} diff --git a/apps/storyblok/src/lib/utils.ts b/apps/storyblok/src/lib/utils.ts index 6415cf0..ac0ab60 100644 --- a/apps/storyblok/src/lib/utils.ts +++ b/apps/storyblok/src/lib/utils.ts @@ -1 +1,13 @@ export const isPreview = process.env.NEXT_PUBLIC_IS_PREVIEW === "true"; + +export async function fetcher(slug: string, params: Record) { + const now = performance.now(); + const response = await fetch(slug, params); + const end = performance.now(); + + console.log("fetcher execution time: ", (end - now).toFixed(2)); + + console.log(response.status, response.statusText); + + return await response.json(); +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 06c5408..af089a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,10 +46,13 @@ importers: version: 0.5.14(@ianvs/prettier-plugin-sort-imports@4.3.0(prettier@3.3.2))(prettier@3.3.2) turbo: specifier: ^2.2.3 - version: 2.2.3 + version: 2.3.3 apps/sanity: dependencies: + '@focus-reactive/sanity-plugin-cms-kit': + specifier: ^0.1.0 + version: 0.1.0(@sanity/icons@3.3.1(react@18.3.1))(@sanity/ui@2.6.3(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)))(react@18.3.1)(sanity@3.52.4(@types/node@22.0.2)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.34.0)) '@portabletext/react': specifier: ^3.1.0 version: 3.1.0(react@18.3.1) @@ -225,7 +228,7 @@ importers: version: 9.1.0(eslint@8.57.0) eslint-config-turbo: specifier: ^2.2.3 - version: 2.2.3(eslint@8.57.0) + version: 2.3.3(eslint@8.57.0) eslint-plugin-react: specifier: ^7.34.1 version: 7.34.3(eslint@8.57.0) @@ -295,13 +298,13 @@ importers: version: 1.1.0(@types/react@18.3.3)(react@18.3.1) '@radix-ui/react-switch': specifier: ^1.1.1 - version: 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-toast': specifier: ^1.1.5 version: 1.2.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@react-three/fiber': specifier: ^8.17.10 - version: 8.17.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.170.0) + version: 8.17.10(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.170.0) '@tanstack/react-table': specifier: ^8.17.3 version: 8.19.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1173,12 +1176,12 @@ packages: peerDependencies: react: '>=16.8.0' - '@dotenvx/dotenvx@1.21.0': - resolution: {integrity: sha512-tbVWzE20ENwex7VOqTX2PiDP68v4SurAOsFHXMiNNCXYzpOXEje/M8lmMr+a8xKCfkhAmO1L+XhsPL7FDyfx4w==} + '@dotenvx/dotenvx@1.31.3': + resolution: {integrity: sha512-NgRjBV8NrCIoRhdbPozkKp+HvSn0Sc8DrOT22YDvTbs5pgPC2YrXKqwI7YwLFDVHBjSJHJTvkhQ5QHCCO+//yg==} hasBin: true - '@ecies/ciphers@0.2.0': - resolution: {integrity: sha512-dqQk3HbyuXSdflgRMrXjEcCohKeBZQl2rm0lOcYnEC4Oue90irVMwVJ0GiM/nhjP0zzGimH8mVFF/pOzQcv+Lg==} + '@ecies/ciphers@0.2.2': + resolution: {integrity: sha512-ylfGR7PyTd+Rm2PqQowG08BCKA22QuX8NzrL+LxAAvazN10DMwdJ2fWwAzRj05FI/M8vNFGm3cv9Wq/GFWCBLg==} engines: {bun: '>=1', deno: '>=2', node: '>=16'} peerDependencies: '@noble/ciphers': ^1.0.0 @@ -1507,6 +1510,14 @@ packages: '@floating-ui/utils@0.2.4': resolution: {integrity: sha512-dWO2pw8hhi+WrXq1YJy2yCuWoL20PddgGaqTgVe4cOS9Q6qklXCiA1tJEqX6BEwRNSCP84/afac9hd4MS+zEUA==} + '@focus-reactive/sanity-plugin-cms-kit@0.1.0': + resolution: {integrity: sha512-oWzjdkuY0w0bVQJTuO7ZnTfR/jkBLmn8ERyOhQOnrkjagjxmuZAPSncaCWkFgxEAawCAPSbn+z/JiMGDfTL1dw==} + peerDependencies: + '@sanity/icons': '*' + '@sanity/ui': '*' + react: '*' + sanity: ^3.0.0 + '@hookform/resolvers@3.9.0': resolution: {integrity: sha512-bU0Gr4EepJ/EQsH/IwEzYLsT/PEj5C0ynLQ4m+GSHS+xKH4TfSelhluTgOaoc4kA5s7eCsQbM4wvZLzELmWzUg==} peerDependencies: @@ -1719,16 +1730,20 @@ packages: cpu: [x64] os: [win32] - '@noble/ciphers@1.0.0': - resolution: {integrity: sha512-wH5EHOmLi0rEazphPbecAzmjd12I6/Yv/SiHdkA9LSycsQk7RuuTp7am5/o62qYr0RScE7Pc9icXGBbsr6cesA==} + '@noble/ciphers@1.1.3': + resolution: {integrity: sha512-Ygv6WnWJHLLiW4fnNDC1z+i13bud+enXOFRBlpxI+NJliPWx5wdR+oWlTjLuBPTqjUjtHXtjkU6w3kuuH6upZA==} engines: {node: ^14.21.3 || >=16} - '@noble/curves@1.6.0': - resolution: {integrity: sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==} + '@noble/curves@1.7.0': + resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} engines: {node: ^14.21.3 || >=16} - '@noble/hashes@1.5.0': - resolution: {integrity: sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==} + '@noble/hashes@1.6.0': + resolution: {integrity: sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==} + engines: {node: ^14.21.3 || >=16} + + '@noble/hashes@1.6.1': + resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} engines: {node: ^14.21.3 || >=16} '@nodelib/fs.scandir@2.1.5': @@ -1797,6 +1812,9 @@ packages: '@radix-ui/primitive@1.1.0': resolution: {integrity: sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==} + '@radix-ui/primitive@1.1.1': + resolution: {integrity: sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==} + '@radix-ui/react-alert-dialog@1.1.1': resolution: {integrity: sha512-wmCoJwj7byuVuiLKqDLlX7ClSUU0vd9sdCeM+2Ls+uf13+cpSJoMgwysHq1SGVVkJj5Xn0XWi1NoRCdkMpr6Mw==} peerDependencies: @@ -1880,6 +1898,15 @@ packages: '@types/react': optional: true + '@radix-ui/react-compose-refs@1.1.1': + resolution: {integrity: sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@radix-ui/react-context@1.0.1': resolution: {integrity: sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==} peerDependencies: @@ -2178,6 +2205,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-primitive@2.0.1': + resolution: {integrity: sha512-sHCWTtxwNn3L3fH8qAfnF3WbUZycW93SM1j3NFDzXBiz8D6F5UTTy8G1+WFEaiCdvCVRJWj6N2R4Xq6HdiHmDg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-roving-focus@1.1.0': resolution: {integrity: sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA==} peerDependencies: @@ -2235,8 +2275,17 @@ packages: '@types/react': optional: true - '@radix-ui/react-switch@1.1.1': - resolution: {integrity: sha512-diPqDDoBcZPSicYoMWdWx+bCPuTRH4QSp9J+65IvtdS0Kuzt67bI6n32vCj8q6NZmYW/ah+2orOtMwcX5eQwIg==} + '@radix-ui/react-slot@1.1.1': + resolution: {integrity: sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-switch@1.1.2': + resolution: {integrity: sha512-zGukiWHjEdBCRyXvKR6iXAQG6qXm2esuAD6kDOi9Cn+1X6ev3ASo4+CsYaD6Fov9r/AQFekqnD/7+V0Cs6/98g==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -2984,8 +3033,10 @@ packages: '@types/react-reconciler@0.26.7': resolution: {integrity: sha512-mBDYl8x+oyPX/VBb3E638N0B7xG+SPk/EAMcVPeexqus/5aTpTphQi0curhhshOqRrc9t6OPoJfEUkbymse/lQ==} - '@types/react-reconciler@0.28.8': - resolution: {integrity: sha512-SN9c4kxXZonFhbX4hJrZy37yw9e7EIxcpHCxQv5JUS18wDE5ovkQKlqQEkufdJCCMfuI9BnjUJvhYeJ9x5Ra7g==} + '@types/react-reconciler@0.28.9': + resolution: {integrity: sha512-HHM3nxyUZ3zAylX8ZEyrDNd2XZOnQ0D5XfunJF5FLQnZbHHYq4UWvW1QfelQNXv1ICNkwYhfxjwfnqivYB6bFg==} + peerDependencies: + '@types/react': '*' '@types/react@18.3.3': resolution: {integrity: sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==} @@ -3305,8 +3356,8 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 - '@webgpu/types@0.1.49': - resolution: {integrity: sha512-NMmS8/DofhH/IFeW+876XrHVWel+J/vdcFCHLDqeJgkH9x0DeiwjVd8LcBdaxdG/T7Rf8VUAYsA8X1efMzLjRQ==} + '@webgpu/types@0.1.52': + resolution: {integrity: sha512-eI883Nlag2hGIkhXxAnq8s4APpqXWuPL3Gbn2ghiU12UjLvfCbVqHK4XfXl3eLRTatqcMmeK7jws7IwWsGfbzw==} JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} @@ -3410,7 +3461,7 @@ packages: engines: {node: '>= 0.4'} array-ify@1.0.0: - resolution: {integrity: sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=} + resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} array-includes@3.1.8: resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} @@ -3834,7 +3885,7 @@ packages: resolution: {integrity: sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==} concat-map@0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} concat-stream@2.0.0: resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} @@ -4226,9 +4277,9 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - eciesjs@0.4.10: - resolution: {integrity: sha512-dYAgdXAC7/d9fEC0w6kpRWj5vHah2BQgMM639g78JI0FUUffMN2Mq60HEHPkyH8ah+FX+cQd6ouDK4kWiatzyw==} - engines: {node: '>=16.0.0'} + eciesjs@0.4.13: + resolution: {integrity: sha512-zBdtR4K+wbj10bWPpIOF9DW+eFYQu8miU5ypunh0t4Bvt83ZPlEWgT5Dq/0G6uwEXumZKjfb5BZxYUZQ2Hzn/Q==} + engines: {bun: '>=1', deno: '>=2', node: '>=16'} electron-to-chromium@1.4.820: resolution: {integrity: sha512-kK/4O/YunacfboFEk/BDf7VO1HoPmDudLTJAU9NmXIOSjsV7qVIX3OrI4REZo0VmdqhcpUcncQc6N8Q3aEXlHg==} @@ -4359,8 +4410,8 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-config-turbo@2.2.3: - resolution: {integrity: sha512-/zwNU+G2w0HszXzWILdl6/Catt86ejUG7vsFSdpnFzFAAUbbT2TxgoCFvC1fKtm6+SkQsXwkRRe9tFz0aMftpg==} + eslint-config-turbo@2.3.3: + resolution: {integrity: sha512-cM9wSBYowQIrjx2MPCzFE6jTnG4vpTPJKZ/O+Ps3CqrmGK/wtNOsY6WHGMwLtKY/nNbgRahAJH6jGVF6k2coOg==} peerDependencies: eslint: '>6.6.0' @@ -4429,8 +4480,8 @@ packages: peerDependencies: tailwindcss: ^3.4.0 - eslint-plugin-turbo@2.2.3: - resolution: {integrity: sha512-LHt35VwxthdGVO6hQRfvmFb6ee8/exAzAYWCy4o87Bnp7urltP8qg7xMd4dPSLAhtfnI2xSo1WgeVaR3MeItxw==} + eslint-plugin-turbo@2.3.3: + resolution: {integrity: sha512-j8UEA0Z+NNCsjZep9G5u5soDQHcXq/x4amrwulk6eHF1U91H2qAjp5I4jQcvJewmccCJbVp734PkHHTRnosjpg==} peerDependencies: eslint: '>6.6.0' @@ -4445,6 +4496,7 @@ packages: eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true esniff@2.0.1: @@ -5474,7 +5526,7 @@ packages: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} jsonparse@1.3.1: - resolution: {integrity: sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=} + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} engines: {'0': node >= 0.2.0} jsx-ast-utils@3.3.5: @@ -7397,38 +7449,38 @@ packages: tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} - turbo-darwin-64@2.2.3: - resolution: {integrity: sha512-Rcm10CuMKQGcdIBS3R/9PMeuYnv6beYIHqfZFeKWVYEWH69sauj4INs83zKMTUiZJ3/hWGZ4jet9AOwhsssLyg==} + turbo-darwin-64@2.3.3: + resolution: {integrity: sha512-bxX82xe6du/3rPmm4aCC5RdEilIN99VUld4HkFQuw+mvFg6darNBuQxyWSHZTtc25XgYjQrjsV05888w1grpaA==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.2.3: - resolution: {integrity: sha512-+EIMHkuLFqUdJYsA3roj66t9+9IciCajgj+DVek+QezEdOJKcRxlvDOS2BUaeN8kEzVSsNiAGnoysFWYw4K0HA==} + turbo-darwin-arm64@2.3.3: + resolution: {integrity: sha512-DYbQwa3NsAuWkCUYVzfOUBbSUBVQzH5HWUFy2Kgi3fGjIWVZOFk86ss+xsWu//rlEAfYwEmopigsPYSmW4X15A==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.2.3: - resolution: {integrity: sha512-UBhJCYnqtaeOBQLmLo8BAisWbc9v9daL9G8upLR+XGj6vuN/Nz6qUAhverN4Pyej1g4Nt1BhROnj6GLOPYyqxQ==} + turbo-linux-64@2.3.3: + resolution: {integrity: sha512-eHj9OIB0dFaP6BxB88jSuaCLsOQSYWBgmhy2ErCu6D2GG6xW3b6e2UWHl/1Ho9FsTg4uVgo4DB9wGsKa5erjUA==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.2.3: - resolution: {integrity: sha512-hJYT9dN06XCQ3jBka/EWvvAETnHRs3xuO/rb5bESmDfG+d9yQjeTMlhRXKrr4eyIMt6cLDt1LBfyi+6CQ+VAwQ==} + turbo-linux-arm64@2.3.3: + resolution: {integrity: sha512-NmDE/NjZoDj1UWBhMtOPmqFLEBKhzGS61KObfrDEbXvU3lekwHeoPvAMfcovzswzch+kN2DrtbNIlz+/rp8OCg==} cpu: [arm64] os: [linux] - turbo-windows-64@2.2.3: - resolution: {integrity: sha512-NPrjacrZypMBF31b4HE4ROg4P3nhMBPHKS5WTpMwf7wydZ8uvdEHpESVNMOtqhlp857zbnKYgP+yJF30H3N2dQ==} + turbo-windows-64@2.3.3: + resolution: {integrity: sha512-O2+BS4QqjK3dOERscXqv7N2GXNcqHr9hXumkMxDj/oGx9oCatIwnnwx34UmzodloSnJpgSqjl8iRWiY65SmYoQ==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.2.3: - resolution: {integrity: sha512-fnNrYBCqn6zgKPKLHu4sOkihBI/+0oYFr075duRxqUZ+1aLWTAGfHZLgjVeLh3zR37CVzuerGIPWAEkNhkWEIw==} + turbo-windows-arm64@2.3.3: + resolution: {integrity: sha512-dW4ZK1r6XLPNYLIKjC4o87HxYidtRRcBeo/hZ9Wng2XM/MqqYkAyzJXJGgRMsc0MMEN9z4+ZIfnSNBrA0b08ag==} cpu: [arm64] os: [win32] - turbo@2.2.3: - resolution: {integrity: sha512-5lDvSqIxCYJ/BAd6rQGK/AzFRhBkbu4JHVMLmGh/hCb7U3CqSnr5Tjwfy9vc+/5wG2DJ6wttgAaA7MoCgvBKZQ==} + turbo@2.3.3: + resolution: {integrity: sha512-DUHWQAcC8BTiUZDRzAYGvpSpGLiaOQPfYXlCieQbwUvmml/LRGIe3raKdrOPOoiX0DYlzxs2nH6BoWJoZrj8hA==} hasBin: true type-check@0.4.0: @@ -7846,12 +7898,12 @@ packages: yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} - yauzl@3.1.3: - resolution: {integrity: sha512-JCCdmlJJWv7L0q/KylOekyRaUrdEoUxWkWVcgorosTROCFWiS9p2NNPE9Yb91ak7b1N5SxAZEliWpspbZccivw==} + yauzl@3.2.0: + resolution: {integrity: sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w==} engines: {node: '>=12'} - yazl@2.5.1: - resolution: {integrity: sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==} + yazl@3.3.1: + resolution: {integrity: sha512-BbETDVWG+VcMUle37k5Fqp//7SDOK2/1+T7X8TD96M3D9G8jK5VLUdQVdVjGi8im7FGkazX7kk5hkU8X4L5Bng==} yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} @@ -7869,8 +7921,8 @@ packages: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} - zip-lib@1.0.4: - resolution: {integrity: sha512-tcwMLUsT/dxgEQMwxoWt0BSP3QVK9vV/rw7ORkUvG6QEW8GgZVDThzhE8FDeROD0vrMG9QDFLreJ9eTOYc56Tw==} + zip-lib@1.0.5: + resolution: {integrity: sha512-8ZW2f9v5ZrPtzAkEcGvzY987EPqR4ULKNvmnK+cmAzHHb2iaZMwO3PZJnyMYPSdB+hlCfCVJnEdczijQR2QEzw==} engines: {node: '>=12'} zip-stream@6.0.1: @@ -8988,11 +9040,11 @@ snapshots: react: 18.3.1 tslib: 2.6.3 - '@dotenvx/dotenvx@1.21.0': + '@dotenvx/dotenvx@1.31.3': dependencies: commander: 11.1.0 dotenv: 16.4.5 - eciesjs: 0.4.10 + eciesjs: 0.4.13 execa: 5.1.1 fdir: 6.4.2(picomatch@4.0.2) ignore: 5.3.1 @@ -9000,9 +9052,9 @@ snapshots: picomatch: 4.0.2 which: 4.0.0 - '@ecies/ciphers@0.2.0(@noble/ciphers@1.0.0)': + '@ecies/ciphers@0.2.2(@noble/ciphers@1.1.3)': dependencies: - '@noble/ciphers': 1.0.0 + '@noble/ciphers': 1.1.3 '@emotion/is-prop-valid@0.8.8': dependencies: @@ -9214,6 +9266,13 @@ snapshots: '@floating-ui/utils@0.2.4': {} + '@focus-reactive/sanity-plugin-cms-kit@0.1.0(@sanity/icons@3.3.1(react@18.3.1))(@sanity/ui@2.6.3(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)))(react@18.3.1)(sanity@3.52.4(@types/node@22.0.2)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.34.0))': + dependencies: + '@sanity/icons': 3.3.1(react@18.3.1) + '@sanity/ui': 2.6.3(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + react: 18.3.1 + sanity: 3.52.4(@types/node@22.0.2)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.34.0) + '@hookform/resolvers@3.9.0(react-hook-form@7.52.1(react@18.3.1))': dependencies: react-hook-form: 7.52.1(react@18.3.1) @@ -9487,13 +9546,15 @@ snapshots: '@next/swc-win32-x64-msvc@14.2.5': optional: true - '@noble/ciphers@1.0.0': {} + '@noble/ciphers@1.1.3': {} - '@noble/curves@1.6.0': + '@noble/curves@1.7.0': dependencies: - '@noble/hashes': 1.5.0 + '@noble/hashes': 1.6.0 - '@noble/hashes@1.5.0': {} + '@noble/hashes@1.6.0': {} + + '@noble/hashes@1.6.1': {} '@nodelib/fs.scandir@2.1.5': dependencies: @@ -9566,6 +9627,8 @@ snapshots: '@radix-ui/primitive@1.1.0': {} + '@radix-ui/primitive@1.1.1': {} + '@radix-ui/react-alert-dialog@1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.0 @@ -9642,6 +9705,12 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 + '@radix-ui/react-compose-refs@1.1.1(@types/react@18.3.3)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + '@radix-ui/react-context@1.0.1(@types/react@18.3.3)(react@18.3.1)': dependencies: '@babel/runtime': 7.24.7 @@ -9945,6 +10014,15 @@ snapshots: '@types/react': 18.3.3 '@types/react-dom': 18.3.0 + '@radix-ui/react-primitive@2.0.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/react-slot': 1.1.1(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.3 + '@types/react-dom': 18.3.0 + '@radix-ui/react-roving-focus@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.0 @@ -10015,12 +10093,19 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 - '@radix-ui/react-switch@1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-slot@1.1.1(@types/react@18.3.3)(react@18.3.1)': dependencies: - '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.3)(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@18.3.3)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.3 + + '@radix-ui/react-switch@1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.1 + '@radix-ui/react-compose-refs': 1.1.1(@types/react@18.3.3)(react@18.3.1) '@radix-ui/react-context': 1.1.1(@types/react@18.3.3)(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.3)(react@18.3.1) '@radix-ui/react-use-previous': 1.1.0(@types/react@18.3.3)(react@18.3.1) '@radix-ui/react-use-size': 1.1.0(@types/react@18.3.3)(react@18.3.1) @@ -10137,7 +10222,7 @@ snapshots: '@radix-ui/rect@1.1.0': {} - '@react-three/fiber@8.17.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.170.0)': + '@react-three/fiber@8.17.10(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.170.0)': dependencies: '@babel/runtime': 7.24.7 '@types/debounce': 1.2.4 @@ -10146,7 +10231,7 @@ snapshots: base64-js: 1.5.1 buffer: 6.0.3 debounce: 1.2.1 - its-fine: 1.2.5(react@18.3.1) + its-fine: 1.2.5(@types/react@18.3.3)(react@18.3.1) react: 18.3.1 react-reconciler: 0.27.0(react@18.3.1) scheduler: 0.21.0 @@ -10155,6 +10240,8 @@ snapshots: zustand: 3.7.2(react@18.3.1) optionalDependencies: react-dom: 18.3.1(react@18.3.1) + transitivePeerDependencies: + - '@types/react' '@rexxars/react-json-inspector@8.0.1(react@18.3.1)': dependencies: @@ -11005,7 +11092,7 @@ snapshots: dependencies: '@types/react': 18.3.3 - '@types/react-reconciler@0.28.8': + '@types/react-reconciler@0.28.9(@types/react@18.3.3)': dependencies: '@types/react': 18.3.3 @@ -11037,7 +11124,7 @@ snapshots: '@tweenjs/tween.js': 23.1.3 '@types/stats.js': 0.17.3 '@types/webxr': 0.5.20 - '@webgpu/types': 0.1.49 + '@webgpu/types': 0.1.52 fflate: 0.8.2 meshoptimizer: 0.18.1 @@ -11418,7 +11505,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@webgpu/types@0.1.49': {} + '@webgpu/types@0.1.52': {} JSONStream@1.3.5: dependencies: @@ -12447,12 +12534,12 @@ snapshots: eastasianwidth@0.2.0: {} - eciesjs@0.4.10: + eciesjs@0.4.13: dependencies: - '@ecies/ciphers': 0.2.0(@noble/ciphers@1.0.0) - '@noble/ciphers': 1.0.0 - '@noble/curves': 1.6.0 - '@noble/hashes': 1.5.0 + '@ecies/ciphers': 0.2.2(@noble/ciphers@1.1.3) + '@noble/ciphers': 1.1.3 + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 electron-to-chromium@1.4.820: {} @@ -12704,10 +12791,10 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-config-turbo@2.2.3(eslint@8.57.0): + eslint-config-turbo@2.3.3(eslint@8.57.0): dependencies: eslint: 8.57.0 - eslint-plugin-turbo: 2.2.3(eslint@8.57.0) + eslint-plugin-turbo: 2.3.3(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -12824,7 +12911,7 @@ snapshots: postcss: 8.4.39 tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.7.28)(@types/node@22.0.2)(typescript@5.4.5)) - eslint-plugin-turbo@2.2.3(eslint@8.57.0): + eslint-plugin-turbo@2.3.3(eslint@8.57.0): dependencies: dotenv: 16.0.3 eslint: 8.57.0 @@ -13838,10 +13925,12 @@ snapshots: reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 - its-fine@1.2.5(react@18.3.1): + its-fine@1.2.5(@types/react@18.3.3)(react@18.3.1): dependencies: - '@types/react-reconciler': 0.28.8 + '@types/react-reconciler': 0.28.9(@types/react@18.3.3) react: 18.3.1 + transitivePeerDependencies: + - '@types/react' jackspeak@2.3.6: dependencies: @@ -15672,10 +15761,10 @@ snapshots: storyblok-backup@0.3.0: dependencies: - '@dotenvx/dotenvx': 1.21.0 + '@dotenvx/dotenvx': 1.31.3 minimist: 1.2.8 storyblok-js-client: 6.10.1 - zip-lib: 1.0.4 + zip-lib: 1.0.5 storyblok-js-client@6.10.1: {} @@ -16138,32 +16227,32 @@ snapshots: dependencies: safe-buffer: 5.2.1 - turbo-darwin-64@2.2.3: + turbo-darwin-64@2.3.3: optional: true - turbo-darwin-arm64@2.2.3: + turbo-darwin-arm64@2.3.3: optional: true - turbo-linux-64@2.2.3: + turbo-linux-64@2.3.3: optional: true - turbo-linux-arm64@2.2.3: + turbo-linux-arm64@2.3.3: optional: true - turbo-windows-64@2.2.3: + turbo-windows-64@2.3.3: optional: true - turbo-windows-arm64@2.2.3: + turbo-windows-arm64@2.3.3: optional: true - turbo@2.2.3: + turbo@2.3.3: optionalDependencies: - turbo-darwin-64: 2.2.3 - turbo-darwin-arm64: 2.2.3 - turbo-linux-64: 2.2.3 - turbo-linux-arm64: 2.2.3 - turbo-windows-64: 2.2.3 - turbo-windows-arm64: 2.2.3 + turbo-darwin-64: 2.3.3 + turbo-darwin-arm64: 2.3.3 + turbo-linux-64: 2.3.3 + turbo-linux-arm64: 2.3.3 + turbo-windows-64: 2.3.3 + turbo-windows-arm64: 2.3.3 type-check@0.4.0: dependencies: @@ -16554,14 +16643,14 @@ snapshots: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 - yauzl@3.1.3: + yauzl@3.2.0: dependencies: buffer-crc32: 0.2.13 pend: 1.2.0 - yazl@2.5.1: + yazl@3.3.1: dependencies: - buffer-crc32: 0.2.13 + buffer-crc32: 1.0.0 yn@3.1.1: {} @@ -16571,10 +16660,10 @@ snapshots: yoctocolors-cjs@2.1.2: {} - zip-lib@1.0.4: + zip-lib@1.0.5: dependencies: - yauzl: 3.1.3 - yazl: 2.5.1 + yauzl: 3.2.0 + yazl: 3.3.1 zip-stream@6.0.1: dependencies: