diff --git a/src/_codux/board-templates/1-component-with-data.board.tsx b/_codux/board-templates/1-component-with-data.board.tsx similarity index 100% rename from src/_codux/board-templates/1-component-with-data.board.tsx rename to _codux/board-templates/1-component-with-data.board.tsx diff --git a/src/_codux/board-templates/2-page-fake-data.board.tsx b/_codux/board-templates/2-page-fake-data.board.tsx similarity index 100% rename from src/_codux/board-templates/2-page-fake-data.board.tsx rename to _codux/board-templates/2-page-fake-data.board.tsx diff --git a/src/_codux/board-templates/3-page-real-data.board.tsx b/_codux/board-templates/3-page-real-data.board.tsx similarity index 100% rename from src/_codux/board-templates/3-page-real-data.board.tsx rename to _codux/board-templates/3-page-real-data.board.tsx diff --git a/src/_codux/board-templates/4-component-empty.board.tsx b/_codux/board-templates/4-component-empty.board.tsx similarity index 100% rename from src/_codux/board-templates/4-component-empty.board.tsx rename to _codux/board-templates/4-component-empty.board.tsx diff --git a/src/_codux/board-templates/5-documentation/new-board.board.tsx b/_codux/board-templates/5-documentation/new-board.board.tsx similarity index 100% rename from src/_codux/board-templates/5-documentation/new-board.board.tsx rename to _codux/board-templates/5-documentation/new-board.board.tsx diff --git a/src/_codux/board-templates/5-documentation/new-board.module.scss b/_codux/board-templates/5-documentation/new-board.module.scss similarity index 100% rename from src/_codux/board-templates/5-documentation/new-board.module.scss rename to _codux/board-templates/5-documentation/new-board.module.scss diff --git a/src/_codux/board-wrappers/component-wrapper.tsx b/_codux/board-wrappers/component-wrapper.tsx similarity index 100% rename from src/_codux/board-wrappers/component-wrapper.tsx rename to _codux/board-wrappers/component-wrapper.tsx diff --git a/src/_codux/board-wrappers/page-wrapper-real-data.tsx b/_codux/board-wrappers/page-wrapper-real-data.tsx similarity index 79% rename from src/_codux/board-wrappers/page-wrapper-real-data.tsx rename to _codux/board-wrappers/page-wrapper-real-data.tsx index 947528c..7a07e05 100644 --- a/src/_codux/board-wrappers/page-wrapper-real-data.tsx +++ b/_codux/board-wrappers/page-wrapper-real-data.tsx @@ -1,7 +1,8 @@ import { RouterProvider, createMemoryRouter } from 'react-router-dom'; -import { WixAPIContextProvider } from '../../api/wix-api-context-provider'; -import { getRoutes } from '../../router/routes'; +import { WixAPIContextProvider } from '../../src/api/wix-api-context-provider'; +import { getRoutes } from '../../src/router/routes'; import { replaceRouteWithChildren } from './set-children-to-route'; +import React from 'react'; type Props = { children?: React.ReactNode; diff --git a/src/_codux/board-wrappers/page-wrapper.tsx b/_codux/board-wrappers/page-wrapper.tsx similarity index 94% rename from src/_codux/board-wrappers/page-wrapper.tsx rename to _codux/board-wrappers/page-wrapper.tsx index a3c2f57..4fc0fe2 100644 --- a/src/_codux/board-wrappers/page-wrapper.tsx +++ b/_codux/board-wrappers/page-wrapper.tsx @@ -3,7 +3,7 @@ import { FakeWixAPIContextProvider, FakeDataSettings, } from '../fake-data/fake-wix-api-context-provider'; -import { getRoutes } from '../../router/routes'; +import { getRoutes } from '~/router/routes'; import { replaceRouteWithChildren } from './set-children-to-route'; type Props = { diff --git a/src/_codux/board-wrappers/set-children-to-route.ts b/_codux/board-wrappers/set-children-to-route.ts similarity index 100% rename from src/_codux/board-wrappers/set-children-to-route.ts rename to _codux/board-wrappers/set-children-to-route.ts diff --git a/src/_codux/board-wrappers/wait-for-helpers.ts b/_codux/board-wrappers/wait-for-helpers.ts similarity index 100% rename from src/_codux/board-wrappers/wait-for-helpers.ts rename to _codux/board-wrappers/wait-for-helpers.ts diff --git a/src/_codux/boards-global-setup.ts b/_codux/boards-global-setup.ts similarity index 88% rename from src/_codux/boards-global-setup.ts rename to _codux/boards-global-setup.ts index d6e463a..7fd261e 100644 --- a/src/_codux/boards-global-setup.ts +++ b/_codux/boards-global-setup.ts @@ -1,4 +1,4 @@ -import '../styles/index.module.scss'; +import '@styles/index.module.scss'; //@ts-ignore import env from 'raw-loader!/.env'; const lines = env.split('\n'); diff --git a/src/_codux/boards/app.board.tsx b/_codux/boards/app.board.tsx similarity index 100% rename from src/_codux/boards/app.board.tsx rename to _codux/boards/app.board.tsx diff --git a/src/_codux/boards/calendar/calendar.board.tsx b/_codux/boards/calendar/calendar.board.tsx similarity index 73% rename from src/_codux/boards/calendar/calendar.board.tsx rename to _codux/boards/calendar/calendar.board.tsx index cf6c1d9..20bfcf5 100644 --- a/src/_codux/boards/calendar/calendar.board.tsx +++ b/_codux/boards/calendar/calendar.board.tsx @@ -1,8 +1,6 @@ -import { Calendar } from '../../../components/calendar/calendar'; -import { ContentSlot, createBoard } from '@wixc3/react-board'; -import { PageWrapper } from '/src/_codux/board-wrappers/page-wrapper'; +import { Calendar } from '~/components/calendar/calendar'; +import { createBoard } from '@wixc3/react-board'; import { useState } from 'react'; -import { format } from 'date-fns'; export default createBoard({ name: 'Calendar', diff --git a/src/_codux/boards/checkout/checkout.board.tsx b/_codux/boards/checkout/checkout.board.tsx similarity index 51% rename from src/_codux/boards/checkout/checkout.board.tsx rename to _codux/boards/checkout/checkout.board.tsx index f3fdf37..786be5c 100644 --- a/src/_codux/boards/checkout/checkout.board.tsx +++ b/_codux/boards/checkout/checkout.board.tsx @@ -1,6 +1,6 @@ -import { Checkout } from '../../../components/checkout/checkout'; +import { Checkout } from '~/components/checkout/checkout'; import { ContentSlot, createBoard } from '@wixc3/react-board'; -import { ComponentWrapper } from '/src/_codux/board-wrappers/component-wrapper'; +import { ComponentWrapper } from '../../board-wrappers/component-wrapper'; export default createBoard({ name: 'Checkout', @@ -11,8 +11,4 @@ export default createBoard({ ), - isSnippet: true, - environmentProps: { - canvasMargin: { right: 0, bottom: 0, left: 0, top: 0 }, - }, }); diff --git a/src/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx b/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx similarity index 84% rename from src/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx rename to _codux/boards/components/dropdown-menu/dropdown-menu.board.tsx index f482ad9..eb5b46b 100644 --- a/src/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx +++ b/_codux/boards/components/dropdown-menu/dropdown-menu.board.tsx @@ -1,5 +1,5 @@ import { ContentSlot, createBoard } from '@wixc3/react-board'; -import { DropdownMenu } from '../../../../components/dropdown-menu/dropdown-menu'; +import { DropdownMenu } from '~/components/dropdown-menu/dropdown-menu'; import { ComponentWrapper } from '../../../board-wrappers/component-wrapper'; export default createBoard({ @@ -35,9 +35,4 @@ export default createBoard({ ), - isSnippet: true, - environmentProps: { - canvasMargin: { right: 0, bottom: 0, left: 0, top: 0 }, - windowWidth: 300, - }, }); diff --git a/_codux/boards/components/footer/footer.board.tsx b/_codux/boards/components/footer/footer.board.tsx new file mode 100644 index 0000000..ddab272 --- /dev/null +++ b/_codux/boards/components/footer/footer.board.tsx @@ -0,0 +1,11 @@ +import { Footer } from '~/components/site-footer/site-footer'; +import { ContentSlot, createBoard } from '@wixc3/react-board'; + +export default createBoard({ + name: 'Footer', + Board: () => ( + +