diff --git a/app/root.jsx b/app/root.jsx index 845de99..90fb596 100644 --- a/app/root.jsx +++ b/app/root.jsx @@ -11,8 +11,11 @@ import { isRouteErrorResponse, } from '@remix-run/react'; import favicon from './assets/favicon.svg'; -import resetStyles from './styles/reset.css?url'; -import appStyles from './styles/app.css?url'; + +// Utopia TODO – fix this +// import resetStyles from './styles/reset.css?url' +// import appStyles from './styles/app.css?url' + import {Layout} from '~/components/Layout'; /** @@ -35,8 +38,8 @@ export const shouldRevalidate = ({formMethod, currentUrl, nextUrl}) => { export function links() { return [ - {rel: 'stylesheet', href: resetStyles}, - {rel: 'stylesheet', href: appStyles}, + // { rel: 'stylesheet', href: resetStyles }, + // { rel: 'stylesheet', href: appStyles }, { rel: 'preconnect', href: 'https://cdn.shopify.com', diff --git a/utopia/antd.utopia.js b/utopia/antd.utopia.js deleted file mode 100644 index 882fc76..0000000 --- a/utopia/antd.utopia.js +++ /dev/null @@ -1,161 +0,0 @@ -import * as Utopia from 'utopia-api'; -import { - TypographyText, - TypographyTitle, - TypographyParagraph, -} from '../app/components/Components'; - -export const AntdTextVariants = [ - { - label: 'Text', - imports: 'import { TypographyText } from "/app/components/Components"', - code: `Sample Text`, - }, - { - label: 'Text (italic)', - imports: 'import { TypographyText } from "/app/components/Components"', - code: `Sample Text`, - }, - { - label: 'Text (bold)', - imports: 'import { TypographyText } from "/app/components/Components"', - code: `Sample Text`, - }, -]; - -export const AntdTitleVariants = [ - { - label: 'Title (Level 1)', - imports: 'import { TypographyTitle } from "/app/components/Components"', - code: `Sample Text`, - }, - { - label: 'Title (Level 2)', - imports: 'import { TypographyTitle } from "/app/components/Components"', - code: `Sample Text`, - }, - { - label: 'Title (Level 3)', - imports: 'import { TypographyTitle } from "/app/components/Components"', - code: `Sample Text`, - }, - { - label: 'Title (Level 4)', - imports: 'import { TypographyTitle } from "/app/components/Components"', - code: `Sample Text`, - }, - { - label: 'Title (Level 5)', - imports: 'import { TypographyTitle } from "/app/components/Components"', - code: `Sample Text`, - }, -]; - -export const AntdParagraphVariants = [ - { - label: 'Paragraph', - imports: 'import { TypographyParagraph } from "/app/components/Components"', - code: `Sample Text`, - }, - { - label: 'Paragraph (italic)', - imports: 'import { TypographyParagraph } from "/app/components/Components"', - code: `Sample Text`, - }, - { - label: 'Paragraph (bold)', - imports: 'import { TypographyParagraph } from "/app/components/Components"', - code: `Sample Text`, - }, -]; - -const AntdTypoBaseProps = { - italic: Utopia.checkboxControl(), - underline: Utopia.checkboxControl(), - mark: Utopia.checkboxControl(), - code: Utopia.checkboxControl(), - delete: Utopia.checkboxControl(), - disabled: Utopia.checkboxControl(), - ellipsis: Utopia.checkboxControl(), - keyboard: Utopia.checkboxControl(), - copyable: Utopia.checkboxControl(), - type: Utopia.popupListControl([ - { - label: 'none', - value: 'undefined', - }, - { - label: 'secondary', - value: 'secondary', - }, - { - label: 'success', - value: 'success', - }, - { - label: 'warning', - value: 'warning', - }, - { - label: 'danger', - value: 'danger', - }, - ]), -}; - -const AntdTypoAnnotations = { - properties: AntdTypoBaseProps, - focus: 'never', - children: { - preferredContents: 'text', - }, - focus: 'never', - inspector: ['typography'], -}; - -/** - * @type {{[modulePath: string]: {[componentName:string]: import("utopia-api").ComponentToRegister}}} - */ -const Components = { - '/app/components/Components': { - TypographyText: { - ...AntdTypoAnnotations, - properties: { - ...AntdTypoBaseProps, - strong: { - control: 'checkbox', - label: 'bold', - }, - }, - component: TypographyText, - icon: 'text', - variants: AntdTextVariants, - }, - TypographyTitle: { - ...AntdTypoAnnotations, - properties: { - level: Utopia.sliderControl(1, 5, 1), - ...AntdTypoBaseProps, - }, - component: TypographyTitle, - icon: 'title', - variants: AntdTitleVariants, - }, - TypographyParagraph: { - ...AntdTypoAnnotations, - properties: { - deemphasized: Utopia.checkboxControl(), - strong: { - control: 'checkbox', - label: 'bold', - }, - ...AntdTypoBaseProps, - }, - component: TypographyParagraph, - icon: 'paragraph', - variants: AntdParagraphVariants, - }, - }, -}; - -export default Components; diff --git a/utopia/storyboard.js b/utopia/storyboard.js index 7ebaa14..c117eec 100644 --- a/utopia/storyboard.js +++ b/utopia/storyboard.js @@ -1,25 +1,26 @@ -import * as React from 'react'; -import {Storyboard, RemixScene} from 'utopia-api'; +import * as React from 'react' +import { Storyboard, RemixScene } from 'utopia-api' -import {getLoadContext} from '../server'; -import {Image} from '@shopify/hydrogen'; +import { getLoadContext } from '../server-context-getter' +import { Image } from '@shopify/hydrogen' const contextGetter = getLoadContext( { PUBLIC_STORE_DOMAIN: 'praiseful-pear.myshopify.com', - PUBLIC_STOREFRONT_API_TOKEN: '541564e540184b9648c529272ffa4b53', + PUBLIC_STOREFRONT_API_TOKEN: + '541564e540184b9648c529272ffa4b53', }, { waitUntil: () => {}, }, // Demo cart ID obtained from https://mock.shop/create-cart 'gid://shopify/Cart/Z2NwLXVzLWNlbnRyYWwxOjAxSEhKQ0I3RFoySlY3Mk5ORlhUVEo2RjhU', -); +) export var storyboard = ( -); +)