Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import '@puckeditor/core/puck.css';

export const pages: Record<string, unknown> = {
'PageBuilder/Manage': () => import('../Views/Manage'),
'PageBuilder/Editor': () => import('../Views/Editor'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { router } from '@inertiajs/react';
import { Puck, usePuck } from '@measured/puck';
import { Puck, usePuck } from '@puckeditor/core';
import {
Button,
Card,
Expand All @@ -16,7 +16,6 @@ import {
import { useCallback, useEffect, useState } from 'react';
import { createPortal } from 'react-dom';
import { puckConfig } from '../puck/config';
import { loadPuckCss } from '../puck/load-css';
import type { Page, PageTemplate } from '../types';

interface Props {
Expand Down Expand Up @@ -121,8 +120,6 @@ function HeaderActions({ page }: { page: Page | null }) {
export default function Editor({ page, templates }: Props) {
const [showTemplatePicker, setShowTemplatePicker] = useState(!page && !!templates?.length);

useEffect(() => loadPuckCss(), []);

// Hide the Blazor shell (sidebar + toggle) so the editor has full screen
useEffect(() => {
const sidebar = document.getElementById('app-sidebar');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Render } from '@measured/puck/rsc';
import { Render } from '@puckeditor/core/rsc';
import { Alert, AlertDescription, Container } from '@simplemodule/ui';
import { useEffect, useMemo } from 'react';
import { useMemo } from 'react';
import { puckConfig } from '../puck/config';
import { loadPuckCss } from '../puck/load-css';
import type { Page } from '../types';

interface Props {
Expand All @@ -11,7 +10,6 @@ interface Props {
}

export default function Viewer({ page, isDraft }: Props) {
useEffect(() => loadPuckCss(), []);
const data = useMemo(() => {
try {
const parsed = JSON.parse(page.content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"react-dom": "^19.0.0"
},
"dependencies": {
"@measured/puck": "^0.18.0"
"@puckeditor/core": "^0.21.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type ButtonBlockProps = {
label: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type CardProps = {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type FlexProps = {
direction: 'row' | 'column';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type GridProps = {
columns: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type HeadingProps = {
text: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type HeroProps = {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type LogosProps = {
logos: { src: string; alt: string }[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type SpaceProps = {
size: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type StatsProps = {
items: { value: string; label: string }[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentConfig } from '@measured/puck';
import type { ComponentConfig } from '@puckeditor/core';

export type TextProps = {
text: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Config } from '@measured/puck';
import type { Config } from '@puckeditor/core';
import { ButtonBlock } from './components/ButtonBlock';
import { Card } from './components/Card';
import { Flex } from './components/Flex';
Expand Down
12 changes: 0 additions & 12 deletions modules/PageBuilder/src/SimpleModule.PageBuilder/puck/load-css.ts

This file was deleted.

Loading