Update all imports to use @ relative

This commit is contained in:
Rami Bitar
2026-05-02 09:42:07 -04:00
parent 7348e430c0
commit a915b729b9
64 changed files with 143 additions and 143 deletions

View File

@@ -1,6 +1,6 @@
import { notFound } from "next/navigation";
import { readSchema } from "~/lib/schema.server";
import RenderClient from "~/components/RenderClient";
import { readSchema } from "@/lib/schema.server";
import RenderClient from "@/components/RenderClient";
export const dynamic = "force-dynamic";

View File

@@ -10,16 +10,16 @@ import {
reactEditorTools,
getEditorContext,
} from "@reacteditor/plugin-ai/server";
import { patchRoute, readSchema } from "~/lib/schema.server";
import { shopifyFetch } from "~/editor/services/shopify/client";
import { patchRoute, readSchema } from "@/lib/schema.server";
import { shopifyFetch } from "@/editor/services/shopify/client";
import {
GET_PRODUCTS_QUERY,
GET_PRODUCT_QUERY,
} from "~/editor/graphql/products";
} from "@/editor/graphql/products";
import {
GET_COLLECTIONS_QUERY,
GET_COLLECTION_PRODUCTS_QUERY,
} from "~/editor/graphql/collections";
} from "@/editor/graphql/collections";
export const runtime = "nodejs";
export const maxDuration = 60;

View File

@@ -1,5 +1,5 @@
import { NextResponse } from "next/server";
import { patchRoute } from "~/lib/schema.server";
import { patchRoute } from "@/lib/schema.server";
export async function POST(request: Request) {
try {

View File

@@ -1,5 +1,5 @@
import { readSchema } from "~/lib/schema.server";
import EditorClient from "~/components/EditorClient";
import { readSchema } from "@/lib/schema.server";
import EditorClient from "@/components/EditorClient";
export const dynamic = "force-dynamic";

View File

@@ -13,9 +13,9 @@ import createTailwindCdnPlugin from "@reacteditor/plugin-tailwind-cdn";
import { aiPlugin } from "@reacteditor/plugin-ai";
import "@reacteditor/core/dist/index.css";
import "~/editor/vendor/plugin-ai.css";
import { createConfig } from "~/editor/config";
import { ShopifyProvider } from "~/editor/contexts/shopify-context";
import { Button } from "~/editor/components/ui/button";
import { createConfig } from "@/editor/config";
import { ShopifyProvider } from "@/editor/contexts/shopify-context";
import { Button } from "@/editor/components/ui/button";
type Schema = Record<string, { root: any; content: any[] }>;

View File

@@ -3,8 +3,8 @@
import { useMemo } from "react";
import { Render } from "@reacteditor/core";
import "@reacteditor/core/dist/index.css";
import { createConfig } from "~/editor/config";
import { ShopifyProvider } from "~/editor/contexts/shopify-context";
import { createConfig } from "@/editor/config";
import { ShopifyProvider } from "@/editor/contexts/shopify-context";
const SHOPIFY_DOMAIN =
process.env.NEXT_PUBLIC_SHOPIFY_DOMAIN ?? "mock.shop";

View File

@@ -1,9 +1,9 @@
'use client';
import React from 'react';
import { useShopifyCart, redirectToCheckout } from '~/editor/hooks/use-shopify-cart';
import { Button } from '~/editor/components/ui/button';
import { Spinner } from '~/editor/components/ui/spinner';
import { useShopifyCart, redirectToCheckout } from '@/editor/hooks/use-shopify-cart';
import { Button } from '@/editor/components/ui/button';
import { Spinner } from '@/editor/components/ui/spinner';
import {
Sheet,
SheetContent,
@@ -11,7 +11,7 @@ import {
SheetTitle,
SheetBody,
AnimatePresence,
} from '~/editor/components/ui/sheet';
} from '@/editor/components/ui/sheet';
const CartDrawer: React.FC = () => {
const { isOpen, closeCart, items, itemCount, totalAmount, checkoutUrl, loading, removeItem, updateItemQuantity } = useShopifyCart();

View File

@@ -1,6 +1,6 @@
import React from 'react';
// local link - plain anchor
import { Card, CardContent } from '~/editor/components/ui/card';
import { Card, CardContent } from '@/editor/components/ui/card';
interface CollectionImage {
url: string;

View File

@@ -1,7 +1,7 @@
'use client';
import React from 'react';
import { useCollectionProducts } from '~/editor/hooks/use-shopify-collections';
import { useCollectionProducts } from '@/editor/hooks/use-shopify-collections';
import ProductCard from './product-card';
const CollectionDetail: React.FC<{ handle?: string }> = ({ handle: handleProp }) => {

View File

@@ -1,9 +1,9 @@
import { ComponentConfig } from "@reacteditor/core";
import { useEffect, useState } from "react";
import { FolderOpen } from "lucide-react";
import { shopifyFetch } from "~/editor/services/shopify/client";
import { GET_COLLECTIONS_QUERY } from "~/editor/graphql/collections";
import { Typography } from "~/editor/theme/Typography";
import { shopifyFetch } from "@/editor/services/shopify/client";
import { GET_COLLECTIONS_QUERY } from "@/editor/graphql/collections";
import { Typography } from "@/editor/theme/Typography";
export type CollectionGridProps = {
tagline: string;

View File

@@ -1,9 +1,9 @@
import { ComponentConfig } from "@reacteditor/core";
import { FolderOpen } from "lucide-react";
import type { ShopifyCollection } from "@reacteditor/field-shopify";
import { useCollectionProducts } from "~/editor/hooks/use-shopify-collections";
import { useCollectionProducts } from "@/editor/hooks/use-shopify-collections";
import { ProductCard } from "./product-card";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type CollectionProps = {
collection: ShopifyCollection | null;

View File

@@ -1,7 +1,7 @@
'use client';
import React from 'react';
import { useCollections } from '~/editor/hooks/use-shopify-collections';
import { useCollections } from '@/editor/hooks/use-shopify-collections';
import CollectionCard from './collection-card';
const Collections: React.FC = () => {

View File

@@ -1,9 +1,9 @@
import { ComponentConfig } from "@reacteditor/core";
import { Star } from "lucide-react";
import type { ShopifyProduct } from "@reacteditor/field-shopify";
import { useProduct } from "~/editor/hooks/use-shopify-products";
import { useShopifyCart } from "~/editor/hooks/use-shopify-cart";
import { Typography } from "~/editor/theme/Typography";
import { useProduct } from "@/editor/hooks/use-shopify-products";
import { useShopifyCart } from "@/editor/hooks/use-shopify-cart";
import { Typography } from "@/editor/theme/Typography";
export type FeaturedProductProps = {
product: ShopifyProduct | null;

View File

@@ -2,13 +2,13 @@
import React, { useState, useEffect } from 'react';
// local link - plain anchor
import { useProduct, type Product } from '~/editor/hooks/use-shopify-products';
import { useShopifyCart } from '~/editor/hooks/use-shopify-cart';
import { useProduct, type Product } from '@/editor/hooks/use-shopify-products';
import { useShopifyCart } from '@/editor/hooks/use-shopify-cart';
import ProductDetailGallery from './product-detail-gallery';
import ProductDetailInfo from './product-detail-info';
import ProductRecommendations from './product-recommendations';
import { Button } from '~/editor/components/ui/button';
import { Alert, AlertTitle, AlertDescription } from '~/editor/components/ui/alert';
import { Button } from '@/editor/components/ui/button';
import { Alert, AlertTitle, AlertDescription } from '@/editor/components/ui/alert';
import {
Breadcrumb,
BreadcrumbList,
@@ -16,7 +16,7 @@ import {
BreadcrumbLink,
BreadcrumbPage,
BreadcrumbSeparator,
} from '~/editor/components/ui/breadcrumb';
} from '@/editor/components/ui/breadcrumb';
interface ProductVariant {
id: string;

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { Button } from '~/editor/components/ui/button';
import { Button } from '@/editor/components/ui/button';
interface ProductImage {
url: string;

View File

@@ -1,8 +1,8 @@
import React from 'react';
import { Product, ProductVariant } from './index.tsx';
import { Button } from '~/editor/components/ui/button';
import { Badge } from '~/editor/components/ui/badge';
import { Spinner } from '~/editor/components/ui/spinner';
import { Button } from '@/editor/components/ui/button';
import { Badge } from '@/editor/components/ui/badge';
import { Spinner } from '@/editor/components/ui/spinner';
interface ProductDetailInfoProps {
product: Product;

View File

@@ -1,7 +1,7 @@
'use client';
import React from 'react';
import { useProductRecommendations } from '~/editor/hooks/use-shopify-products';
import { useProductRecommendations } from '@/editor/hooks/use-shopify-products';
import ProductCard from '../product-card';
interface ProductRecommendationsProps {

View File

@@ -2,9 +2,9 @@ import { ComponentConfig } from "@reacteditor/core";
import { useEffect, useState } from "react";
import { Package } from "lucide-react";
import type { ShopifyProduct } from "@reacteditor/field-shopify";
import { useProduct } from "~/editor/hooks/use-shopify-products";
import { useShopifyCart } from "~/editor/hooks/use-shopify-cart";
import { Typography } from "~/editor/theme/Typography";
import { useProduct } from "@/editor/hooks/use-shopify-products";
import { useShopifyCart } from "@/editor/hooks/use-shopify-cart";
import { Typography } from "@/editor/theme/Typography";
export type ProductDetailsProps = {
product: ShopifyProduct | null;

View File

@@ -2,17 +2,17 @@ import { ComponentConfig } from "@reacteditor/core";
import { useEffect, useState } from "react";
import { GalleryHorizontalEnd } from "lucide-react";
import type { ShopifyCollection } from "@reacteditor/field-shopify";
import { getProducts } from "~/editor/hooks/use-shopify-products";
import { getCollectionProducts } from "~/editor/hooks/use-shopify-collections";
import { getProducts } from "@/editor/hooks/use-shopify-products";
import { getCollectionProducts } from "@/editor/hooks/use-shopify-collections";
import { ProductCard } from "./product-card";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNext,
CarouselPrevious,
} from "~/editor/components/ui/carousel";
} from "@/editor/components/ui/carousel";
export type ProductsCarouselProps = {
collection: ShopifyCollection | null;

View File

@@ -2,10 +2,10 @@ import { ComponentConfig } from "@reacteditor/core";
import { useEffect, useState } from "react";
import { LayoutGrid } from "lucide-react";
import type { ShopifyCollection } from "@reacteditor/field-shopify";
import { getProducts } from "~/editor/hooks/use-shopify-products";
import { getCollectionProducts } from "~/editor/hooks/use-shopify-collections";
import { getProducts } from "@/editor/hooks/use-shopify-products";
import { getCollectionProducts } from "@/editor/hooks/use-shopify-collections";
import { ProductCard } from "./product-card";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type ProductsGridProps = {
collection: ShopifyCollection | null;

View File

@@ -2,9 +2,9 @@
import React, { useState, useEffect } from 'react';
import ProductCard from './product-card';
import { getProducts } from '~/editor/hooks/use-shopify-products';
import { Button } from '~/editor/components/ui/button';
import { Spinner } from '~/editor/components/ui/spinner';
import { getProducts } from '@/editor/hooks/use-shopify-products';
import { Button } from '@/editor/components/ui/button';
import { Spinner } from '@/editor/components/ui/spinner';
interface ProductImage {
url: string;

View File

@@ -4,9 +4,9 @@ import type { ShopifyProduct } from "@reacteditor/field-shopify";
import {
useProduct,
useProductRecommendations,
} from "~/editor/hooks/use-shopify-products";
} from "@/editor/hooks/use-shopify-products";
import { ProductCard } from "./product-card";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type RecommendedProductsProps = {
product: ShopifyProduct | null;

View File

@@ -2,8 +2,8 @@
import React from 'react';
// local link - plain anchor
import { useShopifyCart } from '~/editor/hooks/use-shopify-cart';
import config from '~/editor/lib/config.json';
import { useShopifyCart } from '@/editor/hooks/use-shopify-cart';
import config from '@/editor/lib/config.json';
const CartIcon: React.FC = () => {
const { toggleCart, itemCount } = useShopifyCart();

View File

@@ -1,7 +1,7 @@
import { ComponentConfig } from "@reacteditor/core";
import { Megaphone } from "lucide-react";
import { cn } from "~/editor/lib/utils";
import { Typography } from "~/editor/theme/Typography";
import { cn } from "@/editor/lib/utils";
import { Typography } from "@/editor/theme/Typography";
export type CTAProps = {
tagline: string;

View File

@@ -1,7 +1,7 @@
import { ComponentConfig } from "@reacteditor/core";
import { useState } from "react";
import { HelpCircle, Plus, Minus } from "lucide-react";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type FAQProps = {
tagline: string;

View File

@@ -1,6 +1,6 @@
import { ComponentConfig } from "@reacteditor/core";
import { Sparkles } from "lucide-react";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type FeaturesProps = {
tagline: string;

View File

@@ -1,7 +1,7 @@
import { ComponentConfig } from "@reacteditor/core";
import { useState } from "react";
import { LayoutGrid } from "lucide-react";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type FooterProps = {
brand: string;

View File

@@ -1,7 +1,7 @@
import { ComponentConfig } from "@reacteditor/core";
import { LayoutTemplate } from "lucide-react";
import { cn } from "~/editor/lib/utils";
import { Typography } from "~/editor/theme/Typography";
import { cn } from "@/editor/lib/utils";
import { Typography } from "@/editor/theme/Typography";
export type HeroProps = {
tagline: string;

View File

@@ -1,6 +1,6 @@
import { ComponentConfig } from "@reacteditor/core";
import { Megaphone } from "lucide-react";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
export type BannerProps = {
text: string;

View File

@@ -1,7 +1,7 @@
import { ComponentConfig } from "@reacteditor/core";
import { Images } from "lucide-react";
import { cn } from "~/editor/lib/utils";
import { Typography } from "~/editor/theme/Typography";
import { cn } from "@/editor/lib/utils";
import { Typography } from "@/editor/theme/Typography";
export type ImageGalleryProps = {
tagline: string;

View File

@@ -1,8 +1,8 @@
import { ComponentConfig } from "@reacteditor/core";
import { useState } from "react";
import { Mail } from "lucide-react";
import { cn } from "~/editor/lib/utils";
import { Typography } from "~/editor/theme/Typography";
import { cn } from "@/editor/lib/utils";
import { Typography } from "@/editor/theme/Typography";
export type NewsletterCtaProps = {
tagline: string;

View File

@@ -1,9 +1,9 @@
import { ComponentConfig } from "@reacteditor/core";
import { Menu as MenuIcon, ShoppingBag, Search, User, X } from "lucide-react";
import { useState } from "react";
import { useShopifyCart } from "~/editor/hooks/use-shopify-cart";
import { Sheet, SheetContent, SheetHeader, SheetTitle } from "~/editor/components/ui/sheet";
import { cn } from "~/editor/lib/utils";
import { useShopifyCart } from "@/editor/hooks/use-shopify-cart";
import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@/editor/components/ui/sheet";
import { cn } from "@/editor/lib/utils";
export type NavigationProps = {
brand: string;

View File

@@ -1,7 +1,7 @@
import { ComponentConfig } from "@reacteditor/core";
import { useState } from "react";
import { Quote, ArrowLeft, ArrowRight } from "lucide-react";
import { Typography } from "~/editor/theme/Typography";
import { Typography } from "@/editor/theme/Typography";
export type TestimonialsProps = {
tagline: string;

View File

@@ -4,7 +4,7 @@ import * as React from "react";
import * as AccordionPrimitive from "@radix-ui/react-accordion";
import { ChevronDownIcon } from "lucide-react";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
function Accordion({
...props

View File

@@ -1,6 +1,6 @@
import * as React from "react"
import { cn } from "~/editor/lib/utils"
import { cn } from "@/editor/lib/utils"
type AlertVariant = "default" | "destructive"

View File

@@ -3,7 +3,7 @@
import * as React from "react";
import * as AvatarPrimitive from "@radix-ui/react-avatar";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
function Avatar({
className,

View File

@@ -2,7 +2,7 @@ import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
const badgeVariants = cva(
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none transition-[color,box-shadow] overflow-hidden",

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { cn } from '~/editor/lib/utils';
import { cn } from '@/editor/lib/utils';
function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) {
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;

View File

@@ -2,7 +2,7 @@ import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-2 focus-visible:ring-ring",

View File

@@ -1,6 +1,6 @@
import * as React from "react";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
function Card({ className, ...props }: React.ComponentProps<"div">) {
return (

View File

@@ -6,7 +6,7 @@ import React, {
useRef,
useEffect,
} from 'react';
import { cn } from '~/editor/lib/utils';
import { cn } from '@/editor/lib/utils';
import { Button } from './button';
interface CarouselContextType {

View File

@@ -1,7 +1,7 @@
import React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "~/editor/lib/utils"
import { cn } from "@/editor/lib/utils"
function Empty({ className, ...props }: React.ComponentProps<"div">) {
return (

View File

@@ -1,6 +1,6 @@
import React from 'react';
import { OTPInput, OTPInputContext } from 'input-otp';
import { cn } from '~/editor/lib/utils';
import { cn } from '@/editor/lib/utils';
function InputOTP({
className,

View File

@@ -1,6 +1,6 @@
import * as React from "react"
import { cn } from "~/editor/lib/utils"
import { cn } from "@/editor/lib/utils"
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
return (

View File

@@ -5,7 +5,7 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
import { cva } from "class-variance-authority";
import { ChevronDownIcon } from "lucide-react";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
function NavigationMenu({
className,

View File

@@ -5,8 +5,8 @@ import {
MoreHorizontalIcon,
} from "lucide-react"
import { cn } from "~/editor/lib/utils"
import { buttonVariants, type Button } from "~/editor/components/ui/button"
import { cn } from "@/editor/lib/utils"
import { buttonVariants, type Button } from "@/editor/components/ui/button"
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
return (

View File

@@ -6,7 +6,7 @@ import React, {
useEffect,
useCallback,
} from 'react';
import { cn } from '~/editor/lib/utils';
import { cn } from '@/editor/lib/utils';
interface SelectContextType {
open: boolean;

View File

@@ -3,7 +3,7 @@
import * as React from "react";
import * as SeparatorPrimitive from "@radix-ui/react-separator";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
function Separator({
className,

View File

@@ -1,7 +1,7 @@
import React, { useState, useCallback, useContext, createContext } from 'react';
import { createPortal } from 'react-dom';
import { motion, AnimatePresence } from 'framer-motion';
import { cn } from '~/editor/lib/utils';
import { cn } from '@/editor/lib/utils';
interface SheetContextType {
open: boolean;

View File

@@ -1,4 +1,4 @@
import { cn } from "~/editor/lib/utils"
import { cn } from "@/editor/lib/utils"
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
return (

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { toast } from 'sonner';
import Button from '~/editor/components/ui/button';
import Button from '@/editor/components/ui/button';
export function SonnerDemo() {
return (

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { cn } from '~/editor/lib/utils';
import { cn } from '@/editor/lib/utils';
interface SpinnerProps extends React.ComponentProps<'svg'> {
size?: 'sm' | 'md' | 'lg' | 'xl';

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { cn } from '~/editor/lib/utils';
import { cn } from '@/editor/lib/utils';
interface SwitchProps extends Omit<
React.InputHTMLAttributes<HTMLInputElement>,

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { cn } from '~/editor/lib/utils';
import { cn } from '@/editor/lib/utils';
function Table({ className, ...props }: React.ComponentProps<'table'>) {
return (

View File

@@ -3,7 +3,7 @@
import * as React from "react";
import * as TabsPrimitive from "@radix-ui/react-tabs";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
function Tabs({
className,

View File

@@ -1,6 +1,6 @@
import * as React from "react"
import { cn } from "~/editor/lib/utils"
import { cn } from "@/editor/lib/utils"
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
return (

View File

@@ -3,27 +3,27 @@ import {
createFieldShopifyCollection,
} from "@reacteditor/field-shopify";
import { navigationEditor } from "~/editor/components/navigation/navigation.editor";
import { footerEditor } from "~/editor/components/footer/footer.editor";
import { navigationEditor } from "@/editor/components/navigation/navigation.editor";
import { footerEditor } from "@/editor/components/footer/footer.editor";
import { heroEditor } from "~/editor/components/hero/hero.editor";
import { bannerEditor } from "~/editor/components/landing/banner.editor";
import { heroEditor } from "@/editor/components/hero/hero.editor";
import { bannerEditor } from "@/editor/components/landing/banner.editor";
import { createFeaturedProductEditor } from "~/editor/components/commerce/featured-product.editor";
import { createProductsGridEditor } from "~/editor/components/commerce/products-grid.editor";
import { createProductsCarouselEditor } from "~/editor/components/commerce/products-carousel.editor";
import { collectionGridEditor } from "~/editor/components/commerce/collection-grid.editor";
import { createCollectionEditor } from "~/editor/components/commerce/collection.editor";
import { createProductDetailsEditor } from "~/editor/components/commerce/product-details.editor";
import { createRecommendedProductsEditor } from "~/editor/components/commerce/recommended-products.editor";
import { createFeaturedProductEditor } from "@/editor/components/commerce/featured-product.editor";
import { createProductsGridEditor } from "@/editor/components/commerce/products-grid.editor";
import { createProductsCarouselEditor } from "@/editor/components/commerce/products-carousel.editor";
import { collectionGridEditor } from "@/editor/components/commerce/collection-grid.editor";
import { createCollectionEditor } from "@/editor/components/commerce/collection.editor";
import { createProductDetailsEditor } from "@/editor/components/commerce/product-details.editor";
import { createRecommendedProductsEditor } from "@/editor/components/commerce/recommended-products.editor";
import { featuresEditor } from "~/editor/components/features/features.editor";
import { testimonialsEditor } from "~/editor/components/testimonials/testimonials.editor";
import { imageGalleryEditor } from "~/editor/components/landing/image-gallery.editor";
import { newsletterCtaEditor } from "~/editor/components/landing/newsletter-cta.editor";
import { logosEditor } from "~/editor/components/logos/logos.editor";
import { ctaEditor } from "~/editor/components/cta/cta.editor";
import { faqEditor } from "~/editor/components/faq/faq.editor";
import { featuresEditor } from "@/editor/components/features/features.editor";
import { testimonialsEditor } from "@/editor/components/testimonials/testimonials.editor";
import { imageGalleryEditor } from "@/editor/components/landing/image-gallery.editor";
import { newsletterCtaEditor } from "@/editor/components/landing/newsletter-cta.editor";
import { logosEditor } from "@/editor/components/logos/logos.editor";
import { ctaEditor } from "@/editor/components/cta/cta.editor";
import { faqEditor } from "@/editor/components/faq/faq.editor";
import Root from "./root";
import type { UserConfig } from "./types";

View File

@@ -1,6 +1,6 @@
import { DefaultRootProps, RootConfig } from "@reacteditor/core";
import { createFieldGoogleFonts } from "@reacteditor/field-google-fonts";
import { ThemeProvider, ThemeProps } from "~/editor/theme/ThemeProvider";
import { ThemeProvider, ThemeProps } from "@/editor/theme/ThemeProvider";
export type RootProps = DefaultRootProps &
ThemeProps & {

View File

@@ -1,25 +1,25 @@
import { Config, Data } from "@reacteditor/core";
import { HeroProps } from "~/editor/components/hero/hero.editor";
import { LogosProps } from "~/editor/components/logos/logos.editor";
import { FeaturesProps } from "~/editor/components/features/features.editor";
import { TestimonialsProps } from "~/editor/components/testimonials/testimonials.editor";
import { CTAProps } from "~/editor/components/cta/cta.editor";
import { FAQProps } from "~/editor/components/faq/faq.editor";
import { NavigationProps } from "~/editor/components/navigation/navigation.editor";
import { FooterProps } from "~/editor/components/footer/footer.editor";
import { HeroProps } from "@/editor/components/hero/hero.editor";
import { LogosProps } from "@/editor/components/logos/logos.editor";
import { FeaturesProps } from "@/editor/components/features/features.editor";
import { TestimonialsProps } from "@/editor/components/testimonials/testimonials.editor";
import { CTAProps } from "@/editor/components/cta/cta.editor";
import { FAQProps } from "@/editor/components/faq/faq.editor";
import { NavigationProps } from "@/editor/components/navigation/navigation.editor";
import { FooterProps } from "@/editor/components/footer/footer.editor";
import { ProductsGridProps } from "~/editor/components/commerce/products-grid.editor";
import { ProductsCarouselProps } from "~/editor/components/commerce/products-carousel.editor";
import { CollectionGridProps } from "~/editor/components/commerce/collection-grid.editor";
import { CollectionProps } from "~/editor/components/commerce/collection.editor";
import { ProductDetailsProps } from "~/editor/components/commerce/product-details.editor";
import { RecommendedProductsProps } from "~/editor/components/commerce/recommended-products.editor";
import { FeaturedProductProps } from "~/editor/components/commerce/featured-product.editor";
import { ProductsGridProps } from "@/editor/components/commerce/products-grid.editor";
import { ProductsCarouselProps } from "@/editor/components/commerce/products-carousel.editor";
import { CollectionGridProps } from "@/editor/components/commerce/collection-grid.editor";
import { CollectionProps } from "@/editor/components/commerce/collection.editor";
import { ProductDetailsProps } from "@/editor/components/commerce/product-details.editor";
import { RecommendedProductsProps } from "@/editor/components/commerce/recommended-products.editor";
import { FeaturedProductProps } from "@/editor/components/commerce/featured-product.editor";
import { BannerProps } from "~/editor/components/landing/banner.editor";
import { NewsletterCtaProps } from "~/editor/components/landing/newsletter-cta.editor";
import { ImageGalleryProps } from "~/editor/components/landing/image-gallery.editor";
import { BannerProps } from "@/editor/components/landing/banner.editor";
import { NewsletterCtaProps } from "@/editor/components/landing/newsletter-cta.editor";
import { ImageGalleryProps } from "@/editor/components/landing/image-gallery.editor";
import { RootProps } from "./root";

View File

@@ -7,8 +7,8 @@ import {
addCartLines,
removeCartLines,
updateCartLines,
} from '~/editor/hooks/use-shopify-cart';
import { setShopifyCredentials } from '~/editor/services/shopify/client';
} from '@/editor/hooks/use-shopify-cart';
import { setShopifyCredentials } from '@/editor/services/shopify/client';
const CART_ID_KEY = 'cartId';

View File

@@ -1,15 +1,15 @@
'use client';
import { useContext } from 'react';
import { shopifyFetch, SHOPIFY_STORE_DOMAIN } from '~/editor/services/shopify/client';
import { CartContext } from '~/editor/contexts/shopify-context';
import { shopifyFetch, SHOPIFY_STORE_DOMAIN } from '@/editor/services/shopify/client';
import { CartContext } from '@/editor/contexts/shopify-context';
import {
CREATE_CART_MUTATION,
ADD_CART_LINES_MUTATION,
UPDATE_CART_LINES_MUTATION,
REMOVE_CART_LINES_MUTATION,
GET_CART_QUERY,
} from '~/editor/graphql/cart';
} from '@/editor/graphql/cart';
export interface CartLineInput {
merchandiseId: string;

View File

@@ -1,11 +1,11 @@
'use client';
import { useState, useEffect, useCallback } from 'react';
import { shopifyFetch } from '~/editor/services/shopify/client';
import { shopifyFetch } from '@/editor/services/shopify/client';
import {
GET_COLLECTIONS_QUERY,
GET_COLLECTION_PRODUCTS_QUERY,
} from '~/editor/graphql/collections';
} from '@/editor/graphql/collections';
import type { Product } from './use-shopify-products';
interface CollectionImage {

View File

@@ -1,12 +1,12 @@
'use client';
import { useState, useEffect, useCallback } from 'react';
import { shopifyFetch } from '~/editor/services/shopify/client';
import { shopifyFetch } from '@/editor/services/shopify/client';
import {
GET_PRODUCTS_QUERY,
GET_PRODUCT_QUERY,
QUERY_PRODUCT_RECOMMENDATIONS,
} from '~/editor/graphql/products';
} from '@/editor/graphql/products';
interface ProductImage {
url: string;

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { cn } from "~/editor/lib/utils";
import { cn } from "@/editor/lib/utils";
export type TypographyVariant =
| "h1"